In the UK at least you may get tax reductions for paying in but, as you say, when drawing down your pension it is all subject to income tax (except the 25% tax-free lump sum, up to a limit of £268,275).
Gains in most pensions are free from CGT though:
> The disposal of an investment held for the purposes of a registered pension scheme is not a chargeable gain. It is therefore exempt from capital gains tax.
There are some exemptions for atypical situations, such as overseas pensions schemes, which may explain having to pay CGT.


CG67650 - Pension Schemes: disposal of an asset - HMRC internal manual - GOV.UK