CINCO de MAYO is a day that is important to many Mexicans for a variety of reasons, not which of least was the fact that they were able to defeat a technically superior army. Of course, it helped that the French General held the ability of the Mexican military in contempt (questioned their resolve and ability of their leadership) To understand what led up to the battle of Puebla and why were the French in Mexico in the first place, once must understand the convoluted nature of Mexican politics.
When Juan O'Donoju (Yes, that's Spanish for Sean O'Donohue) the last Spanish Viceroy of Spain agreed with Augustine de Iturbide in 1821 that Mexico should not be part of the Spanish Empire, it unleashed a tumultuous period of instability in Mexico. Basically you had members of Mexico's Criollo (Mexicans of Spanish Ancestry) ruling class fighting amongst themselves to see who would run the country (with the notable exceptions of Vicente Guerrero who was the first person of 'color' to rule Mexico since the Spanish Conquest-he was a Zambo and issued the presidential edict abolishing Slavery in Mexico in 1828, Juan Alvarez who like Guerrero was also a Zambo, became president for a short time in 1854 or 55). Each faction could only agree that it should be a Criollo but they could never really agree on anything else.
During this period you had guys like Antonio Lopez de Santa Ana, Manuel Gomez Pedraza, Antonio Bustamante, Guadalupe Victoria, Mariano Arista, Ignacio Comonfort (Criollo of French Ancestry) running the country. You had many others, but these some of the guys that stand out to me because they all played a part in helping Mexico run up a huge foreign debt. By the time Benito Juarez becomes President in 1858, Mexico has been through hell, the economy is in the dumps, there is a huge debt and though I'm sure this subject has never been taught in Mexican schools (Thank the Almighty for the UT School of Latin American Studies) racial tension as the Criollo Ruling class was not really crazy about having an Indian running the country. Well Benito did some things that made people upset, he confiscated church property (big mistake as the church provided the social services the state did not provide-hospitals, orphanages, assistance to the poor), wanted to limit the power of the military, reform the judiciary (he was a lawyer, so of course that went without saying), wanted to limit the power of the Criollo Ruling class by confiscating their property and open up the economy using the U.S.A. as his model for economic reform (Juarez was a big believer in lazzie-faire economics and would have loved Milton Friedman and his ideas, but that is lesson for another day).
Anyway, Mexico had run up this huge foreign debt and he made the decision in 1860 or 1861 to stop paying the debt. Well in response Britain, Spain & France decided to send ships and troops to occupy the port and city Veracruz. Napoleon Bonaparte III looked at this as his opportunity to expand the French Empire (according to legend, he was the one who coined the term "Latin America" as France and the French were descendents of the Romans, he would establish a new Roman Empire-again lesson for another day with himself as the new Caesar). Anyway, The British and the Spanish decided to withdraw, but Napoleon made deals with the Criollo Ruling Class and elements within the Mexican military and the troops stayed with the understanding that an Emperor from one of Europe's Ruling Houses would be crowned King.
So now we come to the battle of Puebla in 1862, which believe it or not was the result of a big misunderstanding as there was truce at the time to allow French forces to withdraw to coast in order to avoid hostilities. Well French General Charles Ferdinand Latrille de Lorencez. (Did not think much of Mexicans) left some of his troops who were sick (probably from the water) behind with their weapons of course and they were walking around the town with their weapons. Well the Mexicans thought the French had deliberately violated the terms of the temporary truce and are looking for a fight.
One thing led to another as Latrille de Lorencez received word and thought that his sick troops were about to be wacked. He uses this opportunity to engage the Mexican troops on the way to Puebla and crush them to demonstrate superior French Military tactics and resolve. He also hoped it would force the Republican forces to sue for peace on his terms. These things among others lead to the great battle of Puebla as the Mexicans under Ignacio Zaragoza from right here in Texas lead the Mexicans to victory over the French. Of course the celebration was short lived as Napoleon sent some 30,000 troops to Mexico afterwards and the French did come back and actually took Puebla and marched on straight to Mexico City and occupied the country (or parts there of).
Of course, Maximilian of the House of Hapsburg and his wife Carlotta actually proved to be a disappointment to the Conservative Criollos as they did not repeal of the "reforms" in acted by Benito Juarez and in fact expanded on those reforms by securing or attempting to anyway more rights for Mexico's Indians and poor Mestizo's. He initiated many of the public works in Mexico City and even reached out to Benito Juarez to seek peace by offering him the position of Prime Minister. But in the end Benito and his forces defeated the French and despite pleas from people at home and abroad had Maximilian wacked by firing squad in 1867.
PS…Cinco de Mayo is not a Federal Holiday in Mexico