Cherrybim, you are so wrong! The Beis HaMikdash did have a mechitza — during Simchas Beis HaShoeva when many women came. That mechitza is the mekor for having a mechitza in shuls or at simchos (even if women do not dance).
As I’ve said before, this is the Machlokes whether a mechitza is required in this day as well. It is a Machlokes Rishonim. Rashi in Succah and the Rambam in Yad hold there was no physical Mechitza, just a separation. Rambam in POerush Hamishna is Mashma there was a physical blockage.
Later day Poskim (such as the Satmer Rov, I believe) say that even though there was no mechitza in the Bais Hamikdash, we need it due to Niskatnu Hadoros.