You are conflating two things. If Bitcoin cryptography were hacked, then it would be game over for that particular cryptocurrency (and for SHA-256). It would mean that someone figured out how to “print” a counterfeit Bitcoin.
What you refer to is the hacking of a website’s (web wallet) protocol for withdrawing bitcoin. That website did not have sufficient safeguards to protect depositors. This is prevented, these days, by requiring 2FA (various authenticators), holding BTC in cold storage (offline wallet) and email verification of withdraw.