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.