It wasn't courtship, that doesn't come out of the blue nor does it come out of squawking. Budgies will put on a big show to impress their mate/object of affection, their singing is happy, there is head bobbing and can also be some food exchange (regurgitation).
Your budgie could have been momentarily hot from having flown around the room. Did you see the eyes pinning and the feathers right below the neck area (back of the neck) to rise as well as the feathers on the forehead?
If so, then he could have been warning you to stay away because he wanted his space away from you.
Budgies can have days where they are more moody and this is something that we should understand and respect. This can happen at times when they are going through a moult and when coming into breeding condition, they can also be a bit more irritable. But this will usually not last very long and as they adjust, their moods will also go back to normal.
RIP sweet Tito (Summer 2008 - January 17th 2013).
You are missed and never will be forgotten.