In my readings Napoleon was most outraged and least forgiving of the Baylen matter because they had surrendered and not fought, at least not before surrendering. When he furiously encountered General Legendre (who served at Baylen)later at a review in Valladolid, he embarrassed and removed him in front of an assembled review suppousedly saying, "On the battlefield, Sir, one fights and if one choose to capitulate rather than fight, one deserves to be shot."
Napoleon's intent, in his brief stay in Spain, was not so much to end the Spanish uprising as to terrify them that they now faced the real French Army and would be quickly and ruthlessly dealt with as opposed to earlier events. This mindset led to the direct attack at Somosierra.
See Georges Blond, "La Grande Armee" for further data on this theory of what happened and why.
Once Napoleon peaked after Freidland and Tilsit he appears to have become a bit more like Hitler than he had previously been. "Don't give up an inch"-Nap in 1813-and if the French Army won't fight hard enough for me to win, they don't deserve me and the Empire.