I agree with the notion of not playing with strangers or inviting them in your home. However, due to real life I have only 2-3 stable friends to play with, so often we have to supplement extra people. The thing is, they are not supposed to be strangers. Almost always they are coworkers, relatives and acquaintances of the stable players. And apparently, some people might be fine to work or hang around with, but absolutely horrible in a tabletop rpg enviroment. Also, sometimes your friends are horrible judges of chatacter. A few times I had to honestly ask my "standard" players what they were thinking. Put simply, some people are lower than animals, either do not understand basic social contracts and duties or do not care. Or are simply naughty words. Of course, I carry some of the responsibility, because I was initially very apprehensive at kicking out problem players that were friends of friends. I learned that this was a huge mistake the hard way. To give a few glaring examples I encountered over the course of ten years...
* Person who NEVER responded when arranging game nights. Never. However, he asked me directly at random intervals when the game is, sometimes after we played. I kicked him out when he was two hours late for the few times he made it to the game and he non-chalantly admitted that he was late because he was watching netflix.
* Guy that reeks from across a large game table. Standing next to him was nauseating. He had a stable job and a home, he just never bathed.
* An absolutely unhinged sociopath that makes you wonder how he still had all his teeth. Ignored every rule about my house, and I mean basic things like do not handle books/models with dripping/stained hands, constantly interrupted me to ask things he already knew or tell ME things I knew. When I snapped at him to be quiet, he went insane. He threw every insult possible and implied that I should be beaten for being an naughty word. I was stunned at the outburst but he just continued playing like normal. I had to threaten him with legal action if did not leave immediately. He did, thankfully, but not before calling me a few more names. The friend that brought him in was also shocked, but I still wonder how he acts at their workplace.
* naughty word that told me "deal with it" when I told him not to smoke indoors. When I kicked him out he tried to justify himself by saying that he had not realized I was the host, because someone else had answered the door for him. As if that makes any difference!
* Duo of idiots that talked loudly about irrelevant stuff right after I asked for 5 minutes of silence to prepare something in game. When I told them to stop one smugly responded with "We're not talking to YOU."
* Political bot that HAS to make eveything about politics and will openly insult and mock others simply for refusing to engage. He saw nothing wrong with his behavior and expected that he would be invited again.
* Somebody mentioned stealing. I have not had anything stolen from me during a game session, but for what it is worth, I have had such an incident during a miniature painting session. The thief in question was a relative of a friend that wanted to paint his first mini and asked me for help and a few more paints. I was glad to help, only to find out that one of my models was missing after he left.
At this point, when I have a prospective player I use the coffee test, as suggested by Raggi in his book. The idea is that you invite the player for a cup of coffee and casual chatter, if it is a person you would not have coffee with again, it is probably a very bad idea to play RPGs with him or her. It is not perfect, but it helps weed out the worst cases.