Is it okay to break a contract for a teaching position to get a job outside of academia? I have another year in my contract as a visiting assistant professor. However, it is possible that I might be recruited for a non-academic position before the end of the next academic year.

Would it be okay for example to accept a job if it meant having to leave before the end of the contract? Obviously I couldn't just leave in the middle of a semester, so at worst I'd be skipping out on a year's work or just the spring semester.

Additionally, the potential job(s) are in the same relative location, so I can't cite moving as a reason. (I know people have broken contracts for spouses relocating for work for example). Does anyone have experience with this? Especially considering that the question revolves around leaving academia, I'd be interested to get any feedback.
Just to clarify, the standard terminology for the action you are considering taking is “resigning”, “quitting”, “handing in your resignation” etc., NOT “breaking a contract”. I’m not just being pedantic here: “breaking a contract” suggests that your contract (together with the applicable labor laws that govern your employment and may override anything the contract you signed says) does not allow any permissible way for you to stop your employment prior to the end date of the contract. Well, I haven’t read your contract and don’t know where in the world you are, but I am extremely skeptical that a normal academia job for a visiting assistant professor would have such draconian restrictions that forbid the normal act of resignation over a multi-year period.

With that said, let’s rephrase your question to say what I think you actually meant, which is: is it okay to resign your visiting assistant professor position to take an industry job? The answer to that is simply: yes. That is what people all over the world in all industries do when they find a professional opportunity that better suits their skills, ambitions and needs. You don’t need to make up excuses about moving or otherwise explain yourself. There is nothing to explain: you simply wish to change jobs, that’s all there is to it.

Hand in your notice, finish the semester or academic year, and go be happy in your new industry career. 

One final thought: if your current job includes long-term responsibilities such as advising students, it would be courteous of you to help your current employer by offering to keep some of those responsibilities on an informal basis after leaving. Especially where students are considered, it will likely be frowned upon if you simply abandon them. Or if you are in charge of a lab, you could offer to help train your replacement even if that requires coming in a few times after you’ve already switched jobs, etc. But those are the only caveats I can think of to the general principle I discussed above.

Good luck!