Why did Mexico fight Spain?

To win their independence: Mexico was a colony of Spain in the Americas from 1521 until 1821.