Why did I wake without my alarm at the time I wanted to?

Ok so I needed to wake up at 5:30 and I set my alarm for 5:30. I wake up at 5:34(close enough) and on my iphone it says that it went off but it still wasn't going off. So the next day I try it again and double check my iphone. I wake up today at 5:36. I guess I was wondering is this me lucidly knowing when to wake? Or is my alarm going off and I'm telling myself to wake up and so it takes like 5 minutes to actually wake up? I'm not sure but if you could help me that would be great.

No one can do anything except guess about this.

We know nothing of your sleep habits, environment, house or anything else that is relevant.

We do know that all animals (including humans) have some kind of biological clock. It may be more accurate in some people than in others.

I once had a cat who just hated the sound of my alarm clock. After a few months, the cat would jump on the bed and wake me up one minute before the alarm sounded.

After a few months, I would awaken just in time to prevent the cat from jumping on the bed and licking my face… 2 minutes before the alarm clock.

Which, if nothing else, shows that we can be trained to do anything, even in our sleep.

Even while we sleep, our brain is still picking up clues from the environment around us (otherwise, you would not hear the alarm clock while asleep, would you). Some are subtle, like birds singing just before sunrise.
Others are explicit and easy to trace (nowadays, I have a neighbour who leaves from work at 6 a.m. - I'm often awakened by the sound of him closing his car door and starting his engine).

If you go to bed with a very strong need to get up at some unusual time the next morning, (and the reason for that makes you anxious - for example, you have to get to the airport to catch a flight), it is possible that your brain will be even more prompt to awaken you at any of the hints it picks up (including some wrong ones, like the furnace starting at 2:30 a.m.)