In the security world it is called "profiling"
It is highly unusual to be asked for an onward ticket when entering a country, unless you look so down and out that the immigration officer may feel that you could run out of money at any time while in the country.
The biggest red flag you can wave at airline check-in is a one-way ticket. Although rarely implemented, most countries do indeed require proof on onward travel, or at least that you show sufficient funds to be able to support yourself during your stay and be able to leave the country at the end of your stay. If you are stopped by immigration on arrival, and you don't have either of the requirements, the airline will be fined for allowing you aboard at your originating city.
This is also a red flag for security as incredibly most terrorists only purchase one-way tickets.
It comes down to one basic truth. Don't profile yourself as a down and out. Don't arrive in a country with a one-way ticket looking like a scarecrow, hippy or gypsy. If you arrive properly dressed and looking reasonably decent, you will rarely have a problem. After you have got through immigration, you can revert to your scungy travel clothes, until it is time to leave and enter another country.
One way of getting over this problem is to purchase full-fare refundable air tickets on your credit card to the nearest point in the next country, print out the internet copy, and then cancel the ticket for a full refund to your card. It would be extremely rare for anyone to go to the trouble of actually checking to see if your ticket is still valid, unless, of course, you are looking like something the cat just dragged in.