Edit: I see your point now, that medieval churches had other functions besides the religious stuff. Still, I see those things as only secondary functions to the buildings; museums and concert halls have those things as their primary functions and are optimized for them. I've been in medieval churches, and there's very little artwork in them, relative to their size, compared to any decent art museum. But I agree, they were a lot more functional for the people of the time than the pyramids.
[1] In fact the burial aspect might even have been a secondary one.
Even if medieval churches had no purpose other than to construct an impressive structure, that isn't something we ought to deem unworthy. Greatness is a fine goal in its own right.
After all, art museums and concert halls overwhelmingly display the things that people find impressive. The things that people don't find impressive don't stand the test of time.
Utilitarian function is certainly a great virtue, but it is not the only virtue.