Pretty much have always been taught that the pharaohs of the time were pretty cruel. But how do we know. Was there some Egyptian official writing about the pyramids construction? How much do we know about the ancient Egyptian government and how? Thank you.
They were not. The idea that they were comes from Herodotus, who visited them in the mid-5th century BCE, more than 2000 years after the pyramids were built. As "the Father of History", many of his texts are presented at face value, especially to grade school students, and so the myth continues. So I repeat myself, the pyramids were not built by slave labour.
Egyptologists studying the pyramids, and (more importantly) the city complexes that housed the work force during construction, have found evidence that the pyramids were largely constructed by unskilled labourers, with a much smaller team of skilled overseers to guide them. The workers were paid in beer and bread, as is attested to by wall inscriptions detailing rations, as well as burials for the workers with beer and bread for the afterlife.
We have an entire section of our FAQ dedicated to the pyramids. If you have any other questions about them after checking that out, let us know.