I don't know what kind of truck you have, but sometimes (not often) the tailgate on my Silverado just falls open. Seems to be random, no big bumps or other reasons I can identify.
Some kind of design flaw. My guess is they compromised on it being easy to open and staying closed. Not the first time the engineers got it wrong.