I don't have a Roku TV, so this is pure speculation.
Many tvs start up showing the input they were on when shut down.
Seeing the transition occasionally may be because when you shut down the tv it was set to view something other than HDMI1 so it starts up on a different input and then switches.
When switching to an HDMI input the tv and whatever is connected to that input exchange information so that both can set themselves to connect properly with each other - this is referred to as a handshake. You can get odd results if the handshake fails. When you shut down most tvs they just go into standby mode so they can start up more quickly. My guess is the established handshake for the current input is maintained during standby, so everything starts up right. When it has to immediately switch to a different input, perhaps the tv or the other device isn't ready to perform the handshake so the handshake fails.
Roku Community Streaming Expert
I am not a Roku employee, only a user like you.
Streaming Stick 4K+ 3821 | Streaming Stick+ 3810 | TCL Roku TV 43S245/C107X | Streaming Stick 3600
If this post solves your problem please help others find this answer by clicking "Accept as Solution.". Please only do this if it ACTUALLY solves your problem.