I have accepted an answer, but want to add one of my own with some more details I have observed as I go through the process (it's Day 5 today.)
First, this is something you can do to help yourself feel better. Compared to lying in bed, in pain, bored, possibly lonely and scared, and not sure what happens next, just waiting to get better. Giving you something you can do that will improve yourself will, in and of itself, improve you, even if nothing physiological was happening.
Second, it really does work. The vast majority of the pain and effort is simply in getting onto your feet. I noticed quite dramatically that once I had taken 5 or 10 steps I began to feel much better. My pain went down, my strength went up. I am not sure if that was because of increased heart rate and respiration, or the venous return from walking, but there was unmistakably an improvement simply from walking. Several times I would complete the walking distance I had set myself and want to do double or triple that because it was making me feel better.
Third, while you are lying in bed everything is insanely difficult. To reach over and get your drink might involve 10 or more different movements, each of which hurt. Just shifting your weight a little or moving an inch or two to one side you have to fight gravity, drag your body against the bed, etc. Blowing your nose, drinking, changing an uncomfortable position - these things are too hard to do. But when you're vertical, it's far less work to lean a little or turn a little. So you look after your needs better. That means you're less likely to be dehydrated, or to have a coughing fit from stuff you snuffled and swallowed that you should have blown out, or to hurt from lying the wrong way for an hour. This is even more important at home where you don't have beds that can lie you up and down, or tables that swing over the bed to keep things within reach.
Fourth, as with my previous abdominal surgeries I notice that I often need to pee without feeling that sensation of needing to pee at all. Since I'm up and moving anyway, I can stop by the toilet and see if I need to go. Invariably I feel much better, with a huge reduction in pain and improvement in movement, once my bladder is empty. But I hadn't felt an urge that would have pushed me to go through the pain of standing up to deal with it.
Fifth, if this is the norm, especially in the hospital, it makes it easy to spot people who are not recovering at the expected pace. If everyone just lies in bed for 5-6 days waiting to get better, some of them will be majorly ill but you might not notice. If everyone gets up and walks around, the one who can't will stick out like a sore thumb and their infection or whatever will be noticed hours or even days sooner.
While I am still not clear on the exact mechanism that makes this work, I can report that it really does work, on a very small time scale. If you feel awful, getting up and walking for one minute can make you feel better. I still find this counter-intuitive but am pleased that it's standard procedure where I (and my relative) live, because it's clearly helpful.