I thought shelf companies were so you could quickly get a new company going (as it's all pre-registered), so you have an established history, which some organisations - such as banks - value, or so you can access a type of company no longer available[0]. They're not fake companies; to the extent companies are "real", they are real. They're just dormant.
You're probably thinking of letterbox companies. Shelf companies are kept by lawyers, accountants and the like so they can provide them to clients without them having to go through an incorporation process. In some jurisdictions it's a way to not have to wait a year or so until you can pay out cheap dividends.
[0] https://www.sars.gov.za/businesses-and-employers/small-busin...