This is definitely a pretty gutsy move.
It cuts the rumor mill off at the head. Nobody's gonna gossip about something literally everybody in the office saw happen, which cuts the legs off of any malicious rumormongering or misunderstanding. If her coworkers react with homophobia, She's set it up as a one-sided love, which means she can just quit, leaving a job where she wouldn't have been comfortable and welcome anyway, and it shouldn't adversely effect Hiroko, who would just be seen as a victim. If they react positively, (which they did,) it actually removes a big swath of why Hiroko was afraid to come out in the first place. Either way, the only one outed here is Ayaka.
She's basically taken all the heat onto herself, which takes the pressure off of Hiroko and gives her the room to decide for herself what she actually wants.