Because one day you might need to, and you'll write a 100 lines of code to do it. If you had known what a BFS is and how to write it, you'd be able to accomplish the same task in 10 lines of code.
Counter argument: I could google it, read about it, and implement it. All of it in 1/2H with a computer with internet.
Not on a whiteboard. Which is a fucking stupid interview process.
Very unlikely in my opinion. Either you’re told about it beforehand, inherit a project that’s using it, or introduced to it during your PR. Especially in places that ask about them during an interview...
I don’t think it’s about the BFS, it’s about attitude.