Probably not invented for the pyramid workers as there's evidence of beer being fermented way earlier (potentially all the way back to the hunter-gatherer tribes), but the pyramid workers in Egypt indeed got daily rations of beer - plenty of it!
And yes, I agree, it is one of the most important inventions of all time. It pretty much built civilisation. One of my favourite articles ever: https://nautil.us/issue/8/home/beer-domesticated-man