There are at least two important and related reasons why this happened.
First, those Texans who were originally from the US rebelled because they did not like being ruled by Mexicans. When they came to Texas, they had promised to become Catholic and to essentially assimilate as Mexicans. But they did not want to do that. When Mexico's central government tried to truly take control over Texas, they rebelled.
The rebellion in Texas was also part of a larger conflict in Mexico. Mexico, at the time, was torn by conflict between those who believed in a strong national government and those who wanted the states to have more autonomy. In 1836, Antonio Lopez de Santa Anna took over as leader of the country and annulled the 1824 constitution that had give states more autonomy. His desire to take power for the central government was a concern to many Mexican liberals. This was another reason for the rebellion in Texas.