Despite what many people may think, tamper-proof locks do not exist.
A bike lock is there to make stealing the bike more complicated, to delay the thief and therefore act as a deterrent.
A good lock has an anti-picking lock mechanism and is made out of materials that require very specific tools to break or cut through, making theft more difficult.