Why is this the case, and what can be done to mitigate the risks if your job requires sitting at a desk?
Your body uses motion in several ways to maintain function. One of them is called muscle milking Muscle Milking is the process where blood is pushed back up to your heart by your muscles compressing on the veins. Since the veins have valves to ensure one-way direction, compression (usage) of the muscles causes it to move up, against gravity.
Lymph also piggybacks on this process to push fluid upwards, otherwise occasionally resulting in edema.
Movement of blood is incredibly important. It transports white blood cells to fight various infections in your body, platelets have a tendency to start clotting when blood is moving too slow for a extended period of time (however are extremely important in injuries), nutrients are carried from your intestines, oxygen is carried to cells and carbon dioxide is carried away, filtering by the kidney's, etc.
Another component is the the body's powerful ability to adapt. It doesn't like spending energy when it doesn't have to. Sitting for extended periods of time frequently means your heart doesn't need to be very strong. Should at some point you do need it to do more (like when you're standing or exercising) it must quickly work overtime to keep up. This invites high blood pressure, dizziness and general fatigue.
To push the point, imagine someone who has been bed-ridden for several weeks due to surgery, illness, etc. While in supine (lying on your back) the person may feel fine. However when sitting up the person experiences dizziness, light-headedness and occasionally nausea. Overtime, especially following exercises, the symptoms fade as the body adjusts to being in a sitting position. The same occurs when standing
What to do
The solution is simple. Move. Work out so that periods of inactivity are the exception and not the norm. A strong heart can handle higher level exercises and inactivity. A weak heart will have trouble with the former.
Also, it's the inactivity with sitting that is unhealthy. You can stand and be inactive just as well (standing desk).
I have heard people who, after a long flight, fainted as they get up after landing.
The blood vessels constantly vaso dilate (get wider) and vaso constrict as needed. Following a nights sleep, you may feel dizzy if you quickly stand up. This is because over the course of the night you were likely sitting in supine. Since only minimal pressure is needed to maintain flow in supine, the vessels can vaso dilate.
Upon standing or sitting, the situation changes quickly and the body is not quick enough to respond. Since the body cannot get blood to the highest point (brain) fast enough, it cannot function. Luckily, when people faint they go into a horizontal posture, rapidly providing blood to the brain again.
The above invites trauma of course, but the risk of trauma is less of a issue then the lack of nutrients to the brain.
Sitting for long periods of time is unhealthy because you do not get good blood circulation. Most of your muscles are not moving. Passengers are recommended to get up and walk around on a long haul flight every few hours for the same reason.
In serious cases, the blood may clot in the legs. This is known as deep vein thrombosis. I have heard people who, after a long flight, fainted as they get up after landing. This is because there was insufficient blood pressure to carry nutrition to the brain.
If you use a bad sit posture, it may lead to back pains as well.
Not moving your joints can increase pain in bones and arthritis. It also has an effect on your mental state. Without any change in your surroundings and staying in the same environment can cause depression, increase stress and anxiety.
It can also increase tiredness and feeling sluggish, so if you're at work it can have an effect on your work and the overall workplace.
And the biggest is weight gain!