EDF interview question

Q: Explain why you did this in your code?