That's leetcode interviews for you, and Apple (and other big guys) do them. They favor people (generally college grads) who can answer tricky questions (since tricky questions are how you learn to code) over people who build real world, scalable systems each day for years. People doing the real work generally don't have the time to go back and review tricky questions just for interview purposes.
It's really stupid how the software dev field has become.
I think this is just a lack of testing, pure and simple. Testing is expensive and slow, and it’s the first thing to go when a project is behind.
I’m curious about what you consider tricky questions. I’ve been in IT for decades and interviewed developers for a good chunk of that. I like asking “tricky” questions because they usually separate those who have read about something from those who have actually done something and found the pitfalls, but maybe we’re talking about a different level of detail.