That's a pretty horrid way. It used to be a time where you could just run a recovery partition to reinstall your operating system outside of re partitioning your hard drive.
Every maOS install includes a recovery partition which works as you describe. However, if your hard drive is screwed up thoroughly enough, the recovery partition may not be accessible. In that case, you can still access Internet Recovery, which is located on some sort of ROM and allows you to redownload a working recovery image from Apple's servers.
I've seen non-Mac laptops ship with a recovery partition but:
1. The recovery partition takes up some space, and
2. You (or malware) can mess up the recovery partition, and
3. The recovery partition doesn't exist if just upgraded the storage (e.g. replace the HDD with an SSD).
Macbooks have other failings (e.g. increasingly hard to upgrade/replace hardware yourself) but the operating system recovery works better than anything I've seen for Windows or Linux. Chromebooks have a factory reset key sequence, but that requires a working ChromeOS on the drive.