Let's turn this around. What would stop any player from getting a big signing bonus up front, and then two years later say "I'm done. I don't want to play anymore, I'm keeping the money. Buh-bye!" These signing bonuses would dry up in a hurry. The players do NOT want that.
In the NFL, most salaries are not guaranteed. That's the way the CBA has been negotiated forever. However, signing bonuses are a way to get players guaranteed money up front, that the team can allocate over the length of the contract for cap purposes. If you sign a 5-year deal, the Lions can spread that bonus over the 5 year life of the contract. But it is also understood (and written into the contract) that bonus is for 5 years of performance. If you walk away after year 3, you owe the franchise for those two years that you decided not to play. If the franchise cuts you, well, they breached the contract, not the player, so the player gets to keep the money. However, any unallocated bonus money counts against the cap when the player ceases to play for that team, whether it be retirement or release by the franchise.