Not really lucky, it is just a case of law and knowing your rights. He himself (my solicitor) had a problem with his RS3 that was mapped and had a problem with his engine and Audi refused to cover the warranty and he asked them to prove that the map was the cause of the problem and again they couldn't prove it and he had a new engine fitted.
If your car has been remapped then the only thing that they can refuse warranty on is the ECU. A very good solicitor is worth his weight in gold or as in my case worth his weight in beer as he is a friend.
What can I say, I am not living or much related to the UK so I have to assume either your friend has some good connections or VW UK must be offering some special warranty with ultra customer friendly terms that I'm not aware of
In the rest of the world, I've never heard of a case where the warranty terms were clearly violated but the manufacturer still had to prove the remap caused the failure. It's the other way round and I have instead heard of several stories where the customer himself had to go a really long way to prove to VW that the failure was not related to the remap, and even then it was more a matter of a "good-will" gesture than actually using your rights as those are lost the moment you flash. To be honest that makes sense both ways. If the terms stated that for VW to reject warranty they would have to prove what caused the failure they could probably come up with good excuses on rejecting warranty even on failures that would otherwise be covered, just because of some sort of user error/mis-use. As it is now: "don't alter it and it's covered for all use scenarios" it works for the majority except for people that are into modding...
I do remember not that long ago in the 1.4 TSI twinchargers that even though they widely suffered from high oil consumption and lost cylinders, several cases were refused any warranty work due to them being mapped. There was even a group move against VAG on the matter that never bore any fruit, that was in the UK actually. So yeah, although I'm not doubting your story I can't see it being the norm.