It's a comparison I see often, especially when one is trying to explain what a spell is to someone who is unfamiliar with witchcraft. It's a quick and easy comparison to make, but it's not always an accurate one. This comparison makes it sound like a spell is simply petitioning a deity for aid in achieving a particular goal, but there are many who do not include deity at all when working a spell. The aid of a deity, or even belief in deities, is not needed to preform spellwork. Which is not to say one can't include deities in their workings, certainly you can, just that it's not necessary, and that there are many who do not do this.
I think it also reinforces the stereotype that all prayer is about asking a deity for something, when to many prayer is much more about communing with a deity, building a relationship, giving thanks, honoring, and not always about needing or wanting something. My reasons for praying and my reasons for spellwork often come from two totally different places - even if I do include a deity in my working, it is not the same as communing with that deity during prayer.
Again, I fully recognize that some choose to invoke a deity or deities for all spells, and there's nothing wrong with that in itself, I just wish it wouldn't be presented as the only way it's done, or as if it's a necessity to spellwork in itself.