...I find it strange for people being able to beat the casino since this in theory it is totally impossible in the long run.
We should not deny the fact that there are professional players in this industry who, thanks to their card counting skills, regularly win at casinos. And this is the biggest expense item, and accordingly, the casino makes every effort to identify such players with a further ban on casino gaming.
I have seen many references about card counting and their legality within casinos, in theory, it seems to be a grey area, since gamblers who partake in card counting do not explicitly cheat or mess up with the cards, in order to get a higher leverage against the casino or other gamblers, but it is definitely frown upon by the staff of casinos and they indeed try to identity card counters and ban them from further entering their facilities.
Though, I have the impression those who actually manage to profit from card counting are a rare to find since the mental retention of information and memory must be exceptional in order to pull something like that off.