That was mostly Pato with injuries and they also invested in Pazzini the same year. He just beat Robinho to the punch too.
I'm going from what i remember.El Shaarawy never got a chance in his first year when they had Ibra,Cassano,Boateng,Pato and Robinho ahead of him.Even Maxi Lopez got more chances IIRC.
The following season,Ibra and Cassano were sold,Pato was on the treatment table,Robinho declined drastically which left him with not many options in attack.
Not taking away the credit from Allegri for contributing to El Shaarawy's development but circumstances also played a big role in his breakthrough.Much like how Marchisio brokethrough at Juve which came down to lack of quality in midfield and/or injuries.