I naively thought those huge optical telescopes pointed a big mirror at the sky and then took photos.

I guess they do, but it's everything between plan to point and getting images that's absolutely astounding. Tom Scott explains in a 30 minute video: The largest telescope that will ever be built*.