The legal requirement (existing in Wales and Northern Ireland and coming into force in Scotland this month) relates to all types of 'single use' carrier bags, irrespective of the material that they're made from. So, in those parts of the UK, McDonalds MUST charge customers for paper bags.
The 5p charge includes an element of VAT but the rest of the money is donated to charity.
When similar legislation comes into force in England in a year's time, it will only apply to PLASTIC single use carrier bags (with a proposed exemption for biodegradable bags, which doesn't apply in the rest of the UK), so McDonald's outlets in England won't charge for paper bags (unless they decide to do so voluntarily).