Maybe it's because there's a stereotype of (some) black women being fat, wearing super fake eyelashes, and wigs; all of these are traits that the sexualized green M&M seems to have.
You may also associate it with the fact that is chocolate (so, skin color), more than the unnatural green, which you don't project into anything.
But maybe with a sexualized yellow M&M, you'd think more of a blonde girl or Karen:
See? She's from Nebraska and is about to pursue her actress career after finishing university with the last couple of braincells that remained, after all the alcohol she drank at parties.
She's not going to make it.
After that, she'll work for some government job and get a husband that she'll complain about for being boring, after 10 years or so, but by then they'll be parents of two great children, Kevin and Emily.
They own a Range Rover, a dog, and hamsters for Emily.