Precisely because when you say these abbreviations, the first sound of the first letter is a vowel SOUND, even though it is not a vowel.
SMS - ess em ess . You are not saying SSS MMM SSS you are saying ess em ess. Imagine you are talking about an essay. AN essay. the sounds are the same as the start of AN SMS - an ess em es. so it takes 'an' and not 'a'. Same as the previous example.
If it starts with a vowel sound, no matter whether it is a word or an abbreviation like your examples, you use an. An FBI.... An RCPCA....
Has something made you think the rule is different with abbreviations? It isn't.