I can see how all pivot table capabilities can be replicated via SQL but I think some of that becomes very expensive and error prone while being simple drag-drop in Excel/Sheets.
The ease of doing it is a key feature. if I have to build a certain report because it's my job, I will do it whatever it takes. If I am just doing extra due diligence for myself, I may not do it if it takes hours of SQL crafting.
But the effort to move the data into one from a spreadsheet is way overkill, so I do think it’s not suboptimal to use them even as an engineer.