I would actually start by asking yourself if you really accept the premise of the question, that the two are similar. More specifically ask yourself if you really think they look similar in terms of design, angle, material, ornamentation, purpose, etc.
You may be interested in this previous topic answered by /u/CommodoreCoco
This is a tricky sub to ask that question on, you'll probably get the most academic answer...
... but if your teacher is suggesting anything, at the very least, I think it's important to note that it's an incredibly, obviously, sturdy shape for a large... anything, let alone a structure. Anyone who has ever had to stack things once in their life will quickly realize how effective a pyramid is. I'd be amazed if various civilizations didn't have pyramids pop up at some point based on that alone.
With the materials used (stone) it is easier to make a very tall building in that shape.