There are two related reasons for this.
First, there was a serious conflict in Mexico between those who wanted the federal government to be strong and those who wanted more states’ rights. Many Texans (both of American descent and of Mexican descent) were in favor of states’ rights. When Santa Anna tried to take more power for the central government, they rebelled.
Second, the American Texans simply did not want to adhere to Mexican laws. They did not want to do things like becoming Catholic (which they had promised to do on coming to Mexico) or giving up their slaves (slavery was against Mexican law).
Thus, Texas rebelled partly because of internal Mexican politics and partly because of the attitudes of the American settlers.
There were several reasons why the Texans wanted to be independent of Mexican rule in the 1830s. Tensions had been rising between Texas and Mexico. In 1830, the Mexicans closed the border with the United States. The Mexicans were concerned too many Americans were coming to Texas. The Texans were also upset that Mexico imposed high tariffs on products from the United States. The Texans preferred American products while the Mexicans wanted the Texans to buy Mexican products.
The Texans had other concerns also. The Texans were concerned that their documents had to be in Spanish. They also didn’t like that they had to become Catholic. They also wanted to have their own separate state in Mexico, but that was denied. The Mexicans also banned any new slavery in Texas. The final straw for the Texans was when Santa Anna ended the constitution and became the dictator. After this occurred, the Texans fought to be free from Mexican rule.