Question: For bikes like [these](http://www.herocycles.com/images/octane-recra.jpg), why aren't the rear shocks (the shocks are directly above the pedal) vertical like those of a motorcycle? I don't see how the bike can take shocks when the shock absorber is at such a low angle. 

A friend said the mud-guard is so high because there's no other way to attach it to the cycle at a lower height. Is that really the reason why the mud-guard is so high?

Answer: 
What's above the rear wheel for vertical shocks to mount to?

It's pretty clear from the provided picture that the fulcrum for the rear wheel is near the bottom bracket. An upward force against the rear wheel will cause it to lift, reducing the distance between it and the mount point of the shock, allowing the shock to resist that movement.
The rear wheel is attached to stays that connect to a pivot point. As long as when the rear wheel moves upwards, the wheel and stays all rotate around the pivot to compress (or stretch, depending on shock type) the shock, then the rear suspension should work fine.

Take a look at this bike, the shock is vertical. But, unlike the picture you showed, there are a number of pivot points. The bike you showed has a single pivot near the crank and pedal area. <http://www.dirtragmag.com/sites/default/files/blogarific/wp-content/uploads/2007/06/trek-fuel-ex-full.jpg>

The mudguard is high so that the wheel doesn't hit it and to ensure there is plenty of mud clearance. Most mountain bikers I know don't bother with mudguards, because the faff of them is annoying (it's not because of lack of mud, I'm in the UK and it can get pretty muddy at times). So, they're usually not fitted to mountain bikes as standards. That means, this one has to be fitted to the seat tube, and it doesn't move with the wheel as it takes up shocks.