The reason for the shape is not hard to understand. I’ve seen sun rays come down at the same angles the pyramid edges intersect. It’s an attempt, I think, to get close to the sun.
The Earth's relation to the Sun changes with time, precession, which cycles every 26,000 years and inclination which cycles every year with a 41,000 year range of the tilt. This would have not gone unnoticed by ancient astronomers. So placing a pyramid to face the Sun would be a one time optimized event. Not likely.
The one constant is gravity and its pull. Think of a pile of sand in a sand clock. It forms a cone because that is a stable structure (angle of repose of the sand). The ancients extended this concept in building pyramids that had a natural angle of repose (but with large stones) to endure for eternity. Gravity, not the Sun is the reason for their shape.