Well for one, API access has nothing to do with it, you could to the same hacks through the chatbox, perhaps with a bit more time.
And the same logic about hacks also applies to access to a command line or Linux or a programming language or just a general-purpise computer.
"Given the recent [everything] hacks were [definitely] done with [Python scripts, a Linux distro and a computer with disabled secure boot], it seems [...]"
I hope you get my point.
As for your gun comparison, a gun is a very optional thing and the identification is just for purchase. It's not like a GPS tracker and shot counter is welded onto it at the time of purchase, nor do you need a gun to do the vast majority of everyday tasks.
As for bank KYC, well, I for one am actually not sold on the idea that having to send a blurry photo of my ID and smiling at my phone camera to open a Relovut account is in any way beneficial to society. Terrorism still gets financed, money still gets laundered, taxes still get evaded. But every swipe of my card can and will be used against me by banks, loan providers, advertisers, government agents and eventually also hackers.