When we are working on our homework our brain is working on doing said task. If someone interrupts you, your brain starts to move its attention away from the primary task and focuses on the interruption. When this happens, your brain will go back to said task with less focus than before because it takes time (40 minutes) for your brain to get really focused on a task. This is why multitasking is a myth because our brain cannot focus fully on two tasks or more. This causes our performance with both tasks to drop compared to doing the tasks one at a time. This is the reason focus is so important if you want to do high-quality work.