Google cloud and AWS VPS and many hosting services collect and provide this info by default. Chances are most websites do this including this one you are using now. HN does up bans meaning they must access visitor IP.
Why aren't people starting their protest against the website they're currently using instead of at OP.