The numbering really isn't that erratic. I used to work for Sun, so I got the real story.
In the beginning, there was SunOS of various version numbers up to 4.1.3. These were all BSD-based systems. With SunOS 4.1.3, the marketing and product packaging folks decided that they would call the package of SunOS, OpenWindows, and other stuff Solaris, and SunOS 4.1.3 officially became part of Solaris 1.0. Unfortunately (or fortunately, depening on your point of view), this was a triumph of stealth marketing and most people are unaware to this day that there was ever a Solaris 1.
Solaris 2 signaled a change to a System V code base, and the version numbers of Solaris and SunOS were synchronoized such that Solaris 2.x == SunOS 5.x. At least, up through 2.6.
After Solaris 2.6, the marketing weenies decided that it would give a better image to change the integer part of the version than the first digit after the decimal point. Thus, SunOS 5.7 became part of Solaris 7 and so on.
The only part about the whole thing that I personally find annoying is the habit of releasing updates named by the month/year of release, as "Solaris 8 update 10/01", instead of just calling it "Solaris 8.3".