Earlier quoted context omitted.
If your question is specifically referring to the leetcode style coding interviews, this is exactly how Silicon Valley engineering careers work if you want to change jobs.
Which is such a strange optimization. As an industry we should boycott leetcode style questions.
I don't like it, but it's just the way it is now.