Netgear 5 port managed switch: $30 https://www.netgear.com/business/wired/switches/easy-smart/g...
Ubiquiti 5 port managed switch: $30 https://store.ui.com/us/en/category/all-switching/products/u...
Netgear 24 port managed switch: $260 (with a 1 year subscription included!) https://www.netgear.com/business/wired/switches/smart-cloud/...
Ubiquiti 24 port managed switch: $225 https://store.ui.com/us/en/category/all-switching/products/u...
Sorry, but what markup are you referring to?
I'm sure you can find price differences at different products & tiers, but quickly glancing around it sure doesn't look like Ubiquiti has any particular premium markup.
Regardless having a self-hosted, buy-it-and-own-it, non-business friendly product line absolutely has value. I loved my mikrotik switches when I was just messing around, but the single pane of glass, central management is not insignificant when time becomes a more precious resource and you just need it to work.
The Ubiquiti 5 port switch is actually better than the Netgear one because it's POE powered whereas I don't think the Netgear one is.