Answer:
The Texans declared independence from Mexico because of several reasons. One of the main reasons was the Mexican government's decision to abolish slavery in 1829, which was deeply unpopular among Texans, many of whom were slaveholders. Additionally, Texans were unhappy with the centralization of power in Mexico City, which they felt left them without adequate representation in the government. They also resented the Mexican government's attempts to limit their autonomy and control their commerce.
Another key factor was the military occupation of Texas by General Antonio López de Santa Anna, who dissolved the state government, declared himself dictator, and began to enforce centralist policies that threatened the Texan way of life. In response, Texans organized a rebellion and established a provisional government in 1835, which ultimately declared independence from Mexico on March 2, 1836. This led to a violent conflict with Mexican forces, culminating in the Battle of San Jacinto on April 21, 1836, in which the Texans secured a decisive victory and effectively ended the war for independence.