Originally, the building was built as a bathhouse, as evidenced by the lighting holes in the dome.
..