Uh that went surprisingly smoothly, so what was the point of her even having a boyfriend in the first place?
narrative structure wise: to give our two lovebirds an excuse to even meet up and get started in the first place
in universe: comphet
Additionally - They basically pushed together by their classmates.
Like, he confessed to her, but it was at the constant egging-on (the manga's wording) by her friend group, and then a lot of her feelings about it in chapter 1 involved it seeming more like she and Shouya were putting on a play for their circle, than in any relationship of their own volition.
It's why she felt so distant from him and their dating situation from the get-go. She just went along with it because she figured it was too much hassle and she didn't want to make a fuss.
So really, I'd posit that Shouya was
also meant to set Ritsu up to be ambivalent (or perhaps even somewhat jaded) about love and dating at the outset, so that Yayoi could come along and bust her reservations wide open by opening her eyes to what it's
actually like, and why lots of people enjoy being in love and dating.