Gunpowder was invented as an attempt at an elixir of immortality. Teflon was a refrigerant. Viagra a heart pill.
Cars were invented to transport people and things over distance, but their use KILLS MORE PEOPLE, by more than an order of magnitude++, than all the guns in the US.
“What it was invented for” is completely irrelevant.