Windows let each application (or even window, it's been a long time I don't remember the specifics) define its own palette in 256-color (8-bit) mode. You had reserved colors to make sure the gui looked the same but you'd get all kinds of strange artifacts when you switched to an application that had a custom palette but you could still see other applications windows.
It was years where you had to make the trade off of color depth and related display quirkiness at the expense of speed and performance