The are negotiated in secret because if they were negotiated in the open it would pretty much impossible to ever actually get anything the could be ratified.
Over the course of negotiation generally each party needs to make concessions in some areas in order to get what they want in other areas. From draft to draft what they concede and what they get will change.
If that was all in the open by the time the proposed final treaty is up for ratification every group that thinks that the final draft is less beneficial or more harmful to them than an earlier draft would be opposed. Even if the final is better for them than not having a treaty it often won't matter...they had more in a draft, and will want more negotiations to get that back.