Sure it was not studied to need to open the bays, but the compacity of the plane, edded to the necessary weight reduction may have reduced the thermal insulation.
As said earlier : at lest in a near past, it was necessary to open the bays sometime to reduce the temperature inside
F117 was another beast : it was easier to studied because the plane was only for air to ground purpose, and in only one version, with "poor" avionic.
F35 suffered from beeing declined in 3 versions, and specially the STOVL one, and the emphasis for air to air missions grow during the dev phase. During the developpment it became heavier and heavier, so the different weight reduction phases didn't help to stabilize the whole balance between too many objectives.
I think withour STOVL variant the plane would have been easier to studied with less flaws.