Imagine you are building a social network from scratch. Initially, you have people, but zero friendships. Everyone is a stranger.
Then, events happen in real-time: "User becomes friends with User ." "User becomes friends with User ." "User becomes friends with User ." After every event, you might want to ask: "Are User and User connected?" Running BFS after every single added edge is too slow ( every time). You need something faster.