Why was it established? Do texas med schools actually prefer in state applicants because they may be more likely to stay and continue to practice medicine in state or is it that they really don't have a preference but the state requires them?
It's probably a combination of both. People who grew up in Texas (and hence are residents of Texas) are more likely to stay and practice in Texas once they graduate. Hence, it's in the state's interest to help fund medical schools in the state for the health of its citizens and to help lower the financial burden on new Texas doctors.
It's in the sate's disinterest to have people from out of state use its state taxes subsidized medical schools and then leave. However, the state allows for the option of those who have a demonstrated commitment to Texas to take advantage of the lower costs by gambling that these people will eventually provide health care to the citizens of Texas (the 10% that doesn't have to be in-state).