There are gamblers who have that good discipline which allow then to prevent making big mistakes and incorrect decision making, those who understand that gambling is mostly for fun and not a venue to quickly win money, like what you've said if you have that mindset that you will use spare money or allocated budget which you can afford to lose then after losing the amount you are free to quit and stop, but not many have that same thinking and most are unwilling to accept defeats and keep trying to recover what they've lost.
No one is against getting back what they have lost but there is also objective thinking and risk management that should be followed. This comes with experience. At the beginning when you start playing you will not be able to stop when it would be wise to do so. Every beginner will try to win back their losses and such big losses will affect them and lead to disappointment. You have to go through all of this you have to go through these stages on your own to figure it out and understand how it all works. Some players will eventually leave gambling because it will not suit them and to be honest that is not the worst decision.