> Actually no, owner-occupied residential buildings do not have to meet codes,
You are just straight up incorrect. No two ways about it. I'm actually a little surprised someone could have this little exposure to the residential regulatory bureaucracy. Maybe that's why you can support it.
Here are some (not all) of the residential building codes that apply here.
Those are the codes for building a new building. The codes change but the buildings don't have to. You can occupy a 100-year-old building in San Antonio if you feel like doing it. No regulatory bureaucracy will be concerned.
Any time you do a renovation you have to bring everything up to code. No one is going to stay in a rotting 100-year-old house that's never been renovated.