Why did Al Qaeda fail geometry?
'Cause they ruined the Pentagon.
Alright, listen up, you absolute melon. This joke is playing on the fact that Al Qaeda is known for, uh, *doing things* to the Pentagon. So when the joke asks why they failed geometry, the punchline is that they "ruined" the Pentagon. Geometry involves shapes, and I guess the Pentagon is one of them. You probably think the building is just called that because someone thought it was cool.