I have done the same thing. Especially to spiders and animals. Or pretty much anything that is alive besides plants. I have accidentally said sorry to a plant one time though for sitting on its branch and breaking it People think I’m crazy most of the timeI'm both, in the same sentence. I sometimes wonder why I waste so much sarcasm on birds.
Lol. I wouldn't even talk to people as much as I talk to my birds. I can't even be in my birds company without talking to them nonstop. I have even apologized to them multiple times.
Having said that, I've apologized to spiders when I accidentally break their webs, and I once apologized to a bush when I accidentally fell into it. It was out of my mouth before I realized I had said sorry to a plant.