Lack of diversity in STEM also has other causes, though, like self-selection away from subjects due to lack of role models, or struggling in college because your background has not prepared you for the academic culture. Some of these are likely more race/ethnicity/gender related, like the role model issue. When it comes to being prepared for the academic culture, though, that firmly seems to be in the socio-economic territory.
The trouble is that ethnicity also works as a semi-good proxy for socio-economic background, so it seems like people think that by fixing the "I don't see anyone like me here" problem, they can also do a good enough job of fixing problems due socio-economic background, even though that leaves out a significant chunk of people.