Why is actual SOC of a battery actually higher than what is displayed
The further we discharge lithium batteries, the more damaged they get (a deeper discharge is equivalent to a higher cycling count). This is particularly true for a very deep discharge, where battery voltage decreases rapidly:


Image source: batteryuniversity.com

Keeping the user from discharging the battery to this extend increases battery life time significantly, while not shorting the runtime of one battery charge too much. 

I can't say if in practise it is really as much as 20% of capacity left (this seems like quite a high value), but a certain "safe guard" will keep the battery from going into deep discharge, from which it might not even be able to discover (imagine a user completly discharging the battery and then leaving the device off for several days without recharging. This would surely damage the battery. Shutting down the device at a few percent capacity left will reduce this risk a lot).



The same is true for the upper end of the charging process: If a lithium ion battery is charged to more than 80% the wear of the battery increases. Limiting the charging process to 80% can increase the life time significantly, because the damage done to the single cells when charged to more than 4 V increases as well.

Regarding your comment to memory effect at NiMH:
This effect is quite opposite: You want to discharge these batteries as far as possible, otherwise you will reduce their capacity.