boyfriend inserted his thumb in my butt during sex

i'm pretty confused rn and don't know if it's a big deal or not. my bf (21m) and i (19f) were having sex two hours ago, it was going really great and i was enjoying a lot, then just as i was having an orgasm, he shoved his thumb up my butt. this surprised me and freaked me out, i froze and didn't say a word. he finished a few mins later and when he saw me being completely silent, he asked if i was alright and i asked him why he put his thumb in my butt, and he replied that he read somewhere that doing it to a girl can make the orgasms better and more intense for her. i'm so confused because he didn't ask or tell me, just did that. we have done anal before but every time we spent hours prepping and lubing my butt. this just took me by surprise, and honestly even physically hurt a bit. but this is not how he is, usually he's so sweet and caring during sex and in general. i don't know what to feel, i don't want to think badly of him but right now i feel pretty violated and hurt.