Baby cry freaks out before falling asleep

Kristen

So I know people say babies "fight" sleep when they cry and freak out before passing out, but why do they do they? My 4mo does it all the time and i feel so bad and rock him and cuddle him and then as it passes he falls right asleep like it ain't no thing. Why?