I have actually talked to many professors about this. There is no contract. There is no implicit agreement. People leave all the time for various reasons. Sure, it is kind of crummy to apply for a PhD program knowing you only want a masters, but that is life.
If you leaving early had such a terrible impact on the university, they would make you sign a contract.
If you leaving early had such a terrible impact on the university, they would make you sign a contract.