My Experience...
I've seen this happen before. I'm pretty sure it's even happened to me before. Usually the response I would get from other players is, "That's Poker!"
A couple of things I have learned from this experience though. Typically I try NOT TO FOLLOW an all-in. I think 3BB with AK told the villain that you don't have enough confidence in your cards so he probably knew you didn't have a high pair or AA which literally would have been the only hand better than his...…... minus what the flop, turn and river would have been. I liken it to a lamb or a cow being led to the slaughter. I don't like being lead to a all-in and I use that analogy on myself for remembrance. If I go all-in with a hand I make sure to do it.....FIRST! Maybe that would have intimidated him or at least gave him the notion that maybe you did have AA and maybe he would have folded or thought longer and timed out.
Another thing I consider before going all-in is who's left to bet and what their stack size is. You will have some crazy players who will go all-in with 2/3 unsuited just because they have a bigger stack size than you. He probably figured even if he did lose to you...he wouldn't be out. He would just have a lesser stack and he would just make it back in the next few hands. So if you think you might go all-in....aside from making sure your the first to do it....also check for the remaining players stack sizes. If you still got some dudes with higher stack sizes than you.....be cautious! I'm not saying my way is the right way......I'm just sharing my opinion, my experience and the way I've developed my style over the years.
buuuuuuuut yeah...we've all been there before. That's Poker!