The "lockout" period that the computer goes into if a diver violates the computer's directions for completing an ascent is typically 48 hours because that is deemed an ultra-conservative estimate of how long it might take for the body to completely desaturate. I also like the suggestion by others that 48 hours allows for any signs or symptoms of DCS to manifest themselves. So while 24 hours is probably a reasonable estimate, I suspect the computer manufacturers choose to use 48 just to err on the conservative side. I suppose if a computer manufacturer wanted to get fancy, they could adjust the lockout period in accordance with how egregiously the diver violated the computer's directions, maybe locking up for only 24 hours for violations of just a few minutes (and/or a few feet) but locking up for longer for more severe violations--up to a maximum of 48 hours. But the fixed lockout period of 48 hours keeps it simple for them. The premise is that violating the computer's ascent directions is something that will occur only extremely rarely. So maybe there actually is some element of "punishment" as you put it, as a lockout period that's as short as a common interval between dives (say 12 hours) might not discourage people from more frequently allowing themselves to violate the computer's directions.
Incidentally, my computer (Suunto) also uses 48 hours as a fixed "no-fly time" after operating it in gauge mode. So even though we all typically think of 24 hours as a conservative suggestion for no-fly time, Suunto seems to believe that 48 hours is the most conservative possible no-fly time suggestion.