Hi, welcome to the community forum. If you want specific colors to be assigned, you can change the color by clicking inside the color dot in the legend.
That shouldn't be happening. If you are willing to file a bug report with more details we can look into it. I'm not sure if this behavior is specific to a certain version, but we have made changes to color assignment recently.