The few times that I've been asked very specific technical questions they have always been related to the job I was applying for. Example: a ruby on rails job interview I was shown a few ActiveRecord models and asked what is wrong with them and how I would improve them - the answer was that they were all really polymorphic models but that was not how they were implemented in the code. Or for a frontend role, they might ask you "explain the javascript prototype chain to me".
Again, in my experience, its always seemed like the interview was more of a personal test rather than a technical one. Will the person be easy to work with? Will they be communicative or will they bottle up their issues and resent the team for it. Are they willing to learn? Will they be able to hande occasional pressure and stress? I think its generally accepted that its extremely difficult to accurately gauge a person's technical abilities in an interview. Also employees always start on a probationary contract in which they can be fired with 1-2 weeks notice, this usually lasts between 3-6 months, so if it turns out the employee was blagging it in the interview then it will become apparent pretty quickly and they will likely not make it past the probation period.