You are totally right. One should ask before petting our babies for various reasons. I, for one, made a mistake the other day.
I saw a Yorkie in a store (woman was holding him), it was just a split reaction and I went to pet him! I'm just a sucker for Yorkies, and I think they are all friendly like Baby. Well, he growled at me and almost bit me. Man did I feel stupid. I ALWAYS ask, and this time I didn't! I learned my lesson.