Why do different Android phones with the same camera specs have different picture quality? I was comparing the rear camera quality of two Android phones; The Samsung Galaxy S2 and Lenovo A7000.

Both have the same camera specs,


A7000: 8 MP, 3264 x 2448 pixels, autofocus, dual-LED flash
Galaxy S2: 8 MP, 3264 x 2448 pixels, autofocus, LED flash


When using apps like Snapchat or just Camera, I noticed that the A7000's picture quality is lesser (blurry) than that of the Galaxy S2. The pictures taken using the Lenovo aren't that great and the S2 has some really good quality. 

Why is it that when different phones have same camera spec, they don't capture images the same way?
The only thing you mention is the resolution. Stating that the cameras have the same specs only because they have the same resolution, is a fallacy at best. It's like saying that two cars should perform the same because they both have 4 wheels.


  When using apps like Snapchat or just Camera, I noticed that the A7000's picture quality is lesser (blurry) than that of the GS2.


With the amount of information provided you might as well roll a dice to determine what camera is better. Did you use the same settings? Did you take the same photo?


  Why is it that when different phones have same camera spec, they don't capture images the same way?


There is more to a camera than its resolution: 


Software can have an influence on the image. That software may or may not be visible to you. Noise reduction, stabilisation, etc.
the lens
additional hardware like image stabilisation