I don't see any cogent explanation for why it is desirable to worship tools and weapons. Strange reasoning
The thanks is to the object that has helped us in anyway. This stems from the base of Nature/Environment worship that religions like Hinduism are derived from.
All things in the Universe are seen as a manifestation of God or Parmatma (Supreme life force) than God as a third entity.
As to whether it is useful, it is upto each individual to decide for themselves.
Note: I am a practicing Hindu and we just finished this ritual at home last week, including saying thanks to my Laptop :-)