The Staff of the Magi says :
The staff has 50 charges for the following properties. It regains 4d6 + 2 expended charges daily at dawn. If you expend the last charge, roll a d20. On a 20, the staff regains 1d12 + 1 charges.
Spell Absorption. While holding the staff, you have advantage on saving throws against spells. In addition, you can use your reaction when another creature casts a spell that targets only you. If you do, the staff absorbs the magic of the spell, canceling its effect and gaining a number of charges equal to the absorbed spell's level. However, if doing so brings the staff's total number of charges above 50, the staff explodes as if you activated its retributive strike (see below).
This seems to imply that the staff isn't limited to holding 50 charges just that when it goes over 50 charges it explodes. So, let's say you have 40 charges and dawn comes around without you noticing and you get 12 more charges. Does the staff explode?
Maybe this is why they're so legendary.