It is because, he is TIRED.
After school or what not, it is a long day for a child.
Once they come home, they need to DEFLATE.
And they are tired.
They spent all day, at daycare/school. It is like 'work.' They are on point ALL day and it is tiring for them. Like an adult all day at work.
So at home, is where they let it all hang out.
Don't rush him when he gets home, they are often also hungry after they come home. Let him... deflate. Not making him into a routine RIGHT after coming home. Let him unwind, relax.
Kids, are often tired/fussy/whining/flustered when they come home.
It is a long day for them... listening/behaving/doing what is told to them/having to be perfect, when they are at school or Daycare.
Hence, yes, they can get like this, once home.
And Home... is where they deflate. They need a place to deflate. It is at home.