There is exactly nothing in the language, compiler, or runtime that requires this.
Many people may think this is a good idea for organization/navigation purposes, but that doesn’t mean “you should always” do that – just that it’s a good idea if it helps you navigate.
The original question was about whether there’s some underlying language or engine functionality tied to there being multiple public sections. The answer is that, no, there is no reason, other than that’s what the programmer who wrote the code felt like doing. All “public” bits are equally public, and all “private” bits are equally prive, and all “protected” bits are equally protected. Even the order of functions in the header doesn’t really matter, except in very esoteric cases where you want to call code built by one version of the code from code built by another version of the code (having to do with vtable layout/ordering.) This approximately never matters. When it does, “add new things at the bottom, and never delete anything, even if it’s not used” is the simplest way to make it work.