However, it also 100% legal. Just be careful, make note of the administrator you're putting in a bad spot if you accept yet another job and don't apply for their positions in the future, because they likely will remember you the rest of their career.
The fact is, though, that you have the right to be released from a contract through 45 days before the first day of instruction - even if you've never worked a day for that district.
In short - if you have no intention of working for a school or district, *don't accept the job* if they offer you one. If you would rather work there than where you are, take the job and resign from your current. If you're holding out for something better, decide if you want to be where you are or where someplace offered you.