I have a friend who committed to one school and paid his deposit and everything, found out weeks later that he got into his top choice school, and decided to go to the top choice school because it was the best fit for him. It was totally fine, and he's been employed for a couple years now at a top consulting firm and it didn't ruin his life.
While, it may not look great on you to do something like this, if you write a good message to the program about it (e.g., other program is a better fit for your career goals, better choice financially, etc.), then they have no choice but to understand. It's possible it could burn a bridge with that school so keep that in mind but realistically, I doubt anyone would remember or honestly care that much, or even know outside of the admissions committee. If they're that petty, do you really want to be connected to them later? Just my thoughts!