I have most definitely done things like that. I tend to apologize to inanimate objects when I bump into them, too. Though it’s not always sorrys....once my car was dinging to remind me to turn off my inside lights and I actually said “oh, thank you” and turned off the light.
I thanked my car.