It amazes me that so many people refuse to believe the dev's. In the quest, you get a DM message saying that it's random. Dev's have strongly hinted that there is no pattern. Many who have posted in this thread are indeed making the assumption that it's a puzzle with a solution.
My personal guess is that there is a 1 in 6 chance each time an outer wheel is turned that the floor will fall out, leaving a roughly 1 in 3 chance in getting the gate open without dropping the floor. I have no trouble believeing that the dev's would be perfectly willing to place a bonus treasure room with a random 1 in 3 chance of being able to be accessed. This notion may be terribly frustrating to some, but this sort of thing is classic insidious DM material.