He got caught and he admitted to evading much more. It wasn't like he woke up one day and decided to confess.
He didnt get caught..Hoeneß did a self report of tax evasion, which is normally a secret, but of course it came out and everything that followed was a witch hunt. Maybe he would have been caught soon after his self report, but that is just pure speculation. Normally this self report is leading to immunity/tax amnesty, but the court decided, that this self report was not 100% correct thus not active.
He had a bank account in Switzerland only to gamble with shares..the money there was not black money that he carried there in secret. He gambled..lost..won..lost, but when he won, then he didnt pay the capital gains tax.