Starfleet captains: "The Prime Directive is the highest and most important law, I would literally rather die and sacrifice my entire ship and crew than contaminate the natural cultural development of this civilization."
Also Starfleet captains: "Ok but this time it's different."
This is speculation but I'd bet there was some amount of less-than-voluntary aspect to the construction of at least some of the pyramids. As in "we'll pay you, but this is your job for the next 30 years while you're not harvesting."
TNG is the epitome of competence porn. With the exception of Barclay, everyone is pretty much extremely capable at all times except when the plot includes some space shenanigans that make them less so, like turning into kids or losing your psychic powers.
My barber trims up my eyebrows every time I get a haircut.