I haven't bumped my head on a kitchen cabinet in years, but I well remember doing it and what it feels like.
The cabinet doors in my kitchen here are too low, but if you were bent over doing something at the counter and stood up straight fast without checking, I suppose it could still happen on a door or on the cabinet itself. But I think at some point I simply decided it wasn't ever going to happen again, and so far, so good.
My first times doing this were in Franklin Park Apartments in Hollywood. I absolutely remember that. And it happened a few times elsewhere over the years.
Oh--I've done it with an open car door (my own car), if I'm standing outside of the car retrieving something from inside. Stand up too fast, and you get a surprise as to where the frame of the door was. So I guess I've transferred my hard knocking head mishaps in the kitchen to the car. Somehow I think the kitchen ones always hurt more.