I read somewhere that the turrets of the guns were so heavy it wasn't necessary to weld them on. Was that really the only reason welding the gun wasn't necessary or were there other reasons?
While not quite the full story the idea is that each turret is its own self contained structure that rests in a circular whole cut in the ship. Thats what allows them to rotate! Basically in most cases you would have the turret consisting of the upper rotating gun house above decks, resting on larger ball bearings or similar mechanisms and an electric motor, and a lower usually non rotating Barbette where the shells and powder would be stored and then lifted on hoists which would align into the gun house for loading. You would then run power, water, communications lines as needed to the compartments inside, but just like anything that has to rotate its not always easy or simple to design. While in battle they would serve as essentially self contained fighting compartments with crews of up to 100 men.
Which does mean that their weight alone was what kept them in place, should the ship sink and capsize they would come out and possibly drift away from the rest of the wreck. This for instance happened in the case of the Bismarck which capsized as she sank but came to rest on the sea bed right side up just without her main turrets.
To give you a good diagram of how it looked this is a cutaway of the main turret of an Iowa class, so essentially the ultimate expression and revision of the concept. Pic.