They have the right to check, but this law doesn't mention any requirement to show proof of the return or onward ticket. Likewise, I've never been asked for evidence of (e) through (h) on that list.
I think you have a wrong lecture.
The law indeed doesn't say that you should spontaneously
show a return or onward ticket, which would be silly for an UU to do so. However not having one may lead you to, and is a reason to refuse entry/visa issuance.
In reference to your "They have the right to check, but this law doesn't mention any requirement to
show proof of the return or onward ticket":
If you read correctly, the law doesn't say that you should
show proof of having a passport or having enough money (point b. and point c.), however if you can't show any of it when requested, with no surprise you will be denied issuance of a visa and entry on the territory of the RI. read carefully both point b., c. and d., wording is the same. None say that you should "show proof" of having valid passport, enough funds and ticket, yet it would be silly to argue that the law says you should possess one but don't have to show proof of it.
If you translate it correctly, it says that any Visa should be refused if any applicant doesn''t have a return or onward ticket. It is therefore a requirement to do so, as having enough fund and a valid passport are, and if you are unable to show one, you
may be turned back/deny entry. And quite a few people have been (and even more got threatened and extorted for not having one). It obviously require to be handled by an asshole for it to happen, but the type of immigration officer you may deal with is sometimes a lottery. In the past 15 years, Imigrasi and its officers have improved a lot but you still have some "old school" guys.
The Law I quoted is an UU, therefore very general and not going into details. The Peraturan Pemerintah, Peraturan Menteri and all guidelines (surat ederan and juklak) enacted to implement UU 6/2011 all repeat and explain in further details that no onward/return ticket = no entry/no visa.
Anyway, the reason behind this requirement is very simple. Most of us may have enough money to buy a ticket out if needed. However, and as it has been recorded in the archives of forums like ours, most people who are long term overstayers don't. Imigrasi just want to avoid a situation were they have to detain, at the Nation's cost, people having infringed the Law, be it for overstay or any other reason. Adjudicating your case and putting you quickly in a plane is what they look for. Most detention which last more than necessary is the result of a foreigner not having a ticket out.
By Law, companies are also liable to verify that you have all document legally required, passport, visa if necessary and valid return/onward ticket. If they let you boarding without a ticket, they may be asked by Immigration to fly you back at their expense. Some companies are more aware than others about it. I remember that Emirates, which was the company I was flying with when going back to Europe, was systematically asking me and verifying my KITAP. Being a resident I was exempted of having a return/onward ticket and it was OK but they wouldn't let a tourist/sosbud holder boarding without such proof of ticket.
Though this requirement is less and less enforced, people have to read a Law as a CYA manual. The Law also list as being mentally unsane a reason for deportation from Indonesia. They won't check if you are mentally sane at visa issuance/entry but if a foreigner is caught pissed drunk and acting weird he can be legally put on the first plane out on this reason. If enforced in Bali, tourism would greatly suffer, but some part of Bali would definitely be enjoyable again.