While this is true, those measures are actually distinct from affirmative action, at least technically. It’s an accepted practice to affirmatively try and open up doors to opportunities for everyone equally, thereby creating a diverse environment, but if you try to institute an affirmative action policy and call it a diversity initiative, you might run into trouble (see here for a discussion in the employment context).
It’s much more difficult to justify affirmative action - that is, “those actions appropriate to overcome the effects of past or present practices, policies, or other barriers” - than it is to justify having a diversity policy. For instance, even if your explicit goal is to make your body more diverse, nobody’s going to complain about increasing advertising in urban areas or something like that. But if you specifically set out to ensure that the demographics of your institution will more closely map to some ideally diverse population you’ve envisioned (say by changing admission standards or setting quotas or the like), that’s affirmative action, because ostensibly what you’re doing is saying that absent racial or gender-or-national-origin-based animus, this is the population that would exist, and there’s a fairly narrow line you need to walk to justify that. The difference in practice is pretty clear - increased advertising, while it may be motivated by the hopes for a certain outcome, is much less likely to “unnecessarily trammel the interests of third parties” than something engineered to actually bring the outcome about directly. In the letter case, you have to be prepared to establish that the ill you’re addressing actually exists, and that you’re going to stop addressing it once it’s been addressed.
In other words, while it’s true that a commonly-accepted benefit of affirmative action is increased diversity, it isn’t the case that you can get away with affirmative action on the grounds that it will bring about increased diversity.