Sorry, but Macs require an online account only if you want to use optional online services offered by Apple, just as is the case with Microsoft and something like OneDrive or Office 365.
You aren't required to use the optional services on either platform.
The difference is that Microsoft wants to force you to use an online Microsoft account to log into your own local computer. Macs do not require that.