Ok sure. This explains a lot. If that's the problem you're getting, then it is indeed testing basic programming skills. But the general landscape has gone far beyond this. Nowadays this solution would probably not get you the job. Instead of sorting, you should create hashmaps storing counts of each character and checking equality of the hashmaps. And if you didn't produce the hashmaps solution within 10 minutes, you would not be competitive with the hoardes of people drilling these problems and thus producing the hashmaps solution within 5 minutes. What most people here are complaining about are being expected to solve significantly harder problems within tight timeframes. If you are interested in what these ridiculous problems can be, go to Leetcode and browse the "Hard" problems.
A Hashmap isn't "better." For example, if you need to optimize for memory, running a bubble sort on a character array will be the most compact solution.
Likewise, if you profile, there's no guarantee that a hashmap is faster or slower, or even more readable. It gets into the nitty-gritty of how memory allocation works and the overhead of maintaining a hashmap versus whatever optimized character sorting algorithms are part of your runtime.
Anyway, I've found that companies that want to ding me for those kinds of things aren't worth working for. IMO, we're better off having an industry-standard licensing board. Plenty of other industries do the same thing.
Edit: I've also spent an afternoon with a FAANG's set of practice programming challenges. I won't go into details out of respect for confidentiality, but they weren't unreasonably difficult. I only want to work with people who can solve "most" of them. (No one's perfect.)
The best analogy is like being a musician or an athlete. Anyone can learn to play an instrument or play a sport, but to be a professional musician or athlete requires something that takes more than practice. No one's excluded from those industries due to lack of talent, but the people without the talent have to take the jobs that support the musicians and athletes.