Here is the PDF from Subaru explaining which colors have what under the hood. I know a few people have asked questions regarding this topic so here's a final source for the info! Click to link to full size
My guess is the cost of paint for some colors is higher than others, possibly certain colors don't fare well under the high heat temps in the engine bay as well. But the gray finish is a full paint, not jut a primer. It is sealed etc just like the rest of the car.
Thank you very much for this. This was a very good find. I have heard of different colors not being suited for under hood temps. When I worked at MAACO, we would only do colors under the hood if they had an insulator pad. But whites, blacks, and betweens were all fine. I just never connected the two. And it makes sense considering that not all Crosstrek's get the under hood insulator.