Yeah, some companies do those (or a slight variation, called pair programming interviews). There are a lot of benefits of those, but also some drawbacks.
First, it's much harder to scale in a consistent way.
Second, and more importantly, you also evaluate how they code right now, on these specific technologies, not how well they would code with a bit of training.
Think about it: There are a ton of new college grads who are better software engineers (or would be, with 6 months) than people with 20 years of experience. But a person with 20 years of experience who knows that technology will perform better in an immediate sense than the new grad.
First, it's much harder to scale in a consistent way.
Second, and more importantly, you also evaluate how they code right now, on these specific technologies, not how well they would code with a bit of training.
Think about it: There are a ton of new college grads who are better software engineers (or would be, with 6 months) than people with 20 years of experience. But a person with 20 years of experience who knows that technology will perform better in an immediate sense than the new grad.
No interviews are perfect.