The rainbow color scheme was intentional.
Apple wanted to prove that its technology was a game-changer in the world of computers. To do this, it highlighted one of its main differentiators: color. At the time, no other computer was working with colors.
Apple decided to incorporate colors into the logo to keep the brand synchronized with its tech offering. It updated the logo to a monochrome design in 1998 given that color monitors were no longer a competing factor in the industry.