Control the amount of the bankroll including the emotions.
So yes, if it's not hurting it's fine but if it's hurting that much not just emotionally but also the pocket.
From the simple way of controlling them, it will become a habit and that type of gambler will have an understanding on where he's being too much.
I believe it also depends of the kind of person and how sensitive they are when comes to losing money. In general, I have noticed newbies are more likely to over-react and commit the mistake to chase losses as soon as they start to lose money to the casino.
Perhaps to you losing five bucks is nothing, and you won't lose any sleep because of it, but for some newbie who had expectations on their first session (fueled by gambling streamers and influencers) will get badly hurt by the poor management of both their bankroll and also their emotions.
The size of the bankroll we have to gamble should be directly proportional to our own resistance against stress and grief for losses, otherwise we would just end up hurting economically and mentally, obviously.