The Shulchan Aruch in Orach Chaim Siman 242 writes that it was from Takkanas Ezra that one should clean their clothes on Thursday because of "Kavod Shabbos". The Mishneh Brurah in Sif-Katan 5 explains that it shouldn't be done on Erev Shabbos in order that one should be available to take care of the needs of Shabbos (other needs, food, etc.)
In Hilchos Rosh HaShanah (Shulchan Aruch Orach Chaim Siman 581 Sif 4) it says that one should clean their clothes and take a hair cut Erev Rosh HaShanah. Why in this case of Erev Yom Tov does it not apply the takkana of Ezra mentioned in Siman 242 (that one should clean their clothes from 2 days before Shabbos in order to take care of the needs for Shabbos.) Does the needs of yom tov somehow differ in this regard?