Yes, a patent provides protection,
but it also exposes the secret.
In Wired, Magician and magic trick inventor Rick Lax discusses the problems in protecting magic using patent and copyright law:
In the field of magic, theft is rampant. Close-up magic wholesalers steal from close-up magic wholesalers. Parlor manipulators steal from parlor manipulators. Large-scale illusionists steal from large-scale illusionists.Read the rest: The Tricky Business of Innovation: Can You Patent a Magic Trick? Wired>>
Why do they do it? Because they can.