It's not fully known why men and women perform differently on spatial tasks.
Studies have concluded that men tend to pay more attention to the way their surroundings are laid out, which may explain why they generally score better on tasks like 3D shapes and angles. Researchers have also found that, on average, men are better at finding compass orientations and rely on mental images of three dimensional spaces to find their way.