Irrespective on how safe or unsafe the current situation is, I agree with you on this one thing: there's absolutely no reason whatsoever for the two password fields to contain anything. The scheme on form submission should just be as follows:
Both password fields are empty: no change
Both password contain the same string with length > 0: new password