I think that would very much depend on when: Sun's primary problem was bad management so an early 2000s change might have enabled them to compete against Red Hat — treat usability as a concern, wrap all of those cool kernel features in a non-joke userland, sell support, etc. Sitting out package management for a couple decades really hurt them and that's a relatively cheap engineering commitment. It's interesting to imagine ZFS and zones bringing containerization a decade earlier, but every time they came up the reaction from most of the sysadmins I knew was roughly “call me back when they have apt/yum”.
A coworker who used to work at Sun maintains that they really needed to go private to avoid years of chaos from waves of layoffs when they were profitable but not enough to satisfy Wall Street.