Starting from ~15th century, the mightiest castles in Europe were blown with kegs of powder. Most of those magnificent castles or forts are now as ruins in Europe because of those wars. The reason why UK have preserved those castles is that they had no such equally devastating wars and they were not used for real defence, but clearly their only role is left as prestige of something that was preserved from past.
It all depends on context - medieval castles lost their meanings as defenses 500 years ago. In modern times they are useless as defences - sometimes not even against squatters...