Codes for LEGO Hero Factory Breakout were distributed through official channels: packaging, promotional events, and the franchise's own sites. They were entered in the game's code screen and were typically single use with an expiry date.
Because the promotional cycle has long ended, most circulating lists are dead. Any site claiming to generate working codes is after your attention or your login, so treat it accordingly and enjoy the game's built-in unlocks instead.