It doesn't. "Monkey" is used in common racist language against black people. That's the racist aspect.
"Monkeypox" also became associated with the LGBT+ community after the most recent breakout in the USA. And Americans love hating the gays almost as much as they love being racist. So, there are (at least) two negative stigmas associated with "Monkeypox." They attempted to alleviate this by changing the name to Mpox. (It arguably didn't help much.)