There are two separate checkpoints where it can bite, and the first is the more common. At check-in, the airline can deny you boarding if the destination requires onward travel and you cannot show it, because carriers face fines and the cost of flying you back if you are refused entry. This happens before your trip even starts.
At immigration on arrival, lacking a return ticket rarely causes refusal by itself, but combined with other doubts, vague plans, little money, previous overstays, it feeds the picture an officer builds, and the worst case is denied entry and removal on the next flight at your own expense, with the incident recorded and complicating future visas.
The fix costs almost nothing: buy a refundable onward ticket or a cheap budget-airline hop out of the country before you fly. If you hold a visa permitting open-ended stay, carry proof of that status instead. Never let a saved fare at booking time become a denied boarding at the airport.