From a certain point of view, everything is mathematics. It still takes time and effort to figure out the mathematics to make new things work. Patents guarantee that the people who figure out the math will be able to profit off of it before a whole bunch of copycats steal the work. That should apply to software too - assuming that people actually figured out the math and didn’t just patent some idea without an implementation.
I agree that those shouldn’t be patented - they’re ideas, not implementations. If you have a particular ingenious implementation for one-click shopping, go ahead and patent it. But don’t sue people if they come up with a different way to do the same thing - that just means your implementation wasn’t particularly novel.
So yes, there have been some bad software patents given out. That just means that the process for giving software patents needs to be reformed, not that we need to get rid of software patents.