Basic Project Question

Why is it doing this?

Because that is exactly what you told it to do in the code. A processor executies only one line at a time and does not move on to the next line until it has finished. Therefore delay will in effect do nothing for a set length of time. When that time is up it will go on to the next line.