Uhh sort of dramatic that instead of just asking him outright if he was renewing your contract you decided to throw yourself a little farewell XD but hey any reason to have cake!
I don't see it as throwing a farewell, I always bring a cake for my colleagues to eat after my departure, but it's just a cake in the kitchen, no fuss, no hats or anything.
And I think the OP didn't even envision the possibility of the contract being renewed :D It seems the boss never said anything so OP just assumed it was going to go according to the original contract.
Usually in my country other people give you a cake on your last day which is why it seemed strange to me but thanks for clarifying it's common. If you cared about the job though why wouldn't you bring it up?? I mean if you were in fact losing your job you would need to find new employment. Wouldn't just popping your head into his office and going "hey so I was wondering if my contract would get renewed or if I should start looking for other opportunities" be so much easier and a lot less stress?
And I think the OP didn't even envision the possibility of the contract being renewed :D It seems the boss never said anything so OP just assumed it was going to go according to the original contract.
"Cause it's your job to check this sort of thing?"