loop not stopping

Your code does what you've asked it to do. It loops round the for loop twice then it goes back to the top of loop() and loops round the for loop twice again and again and again and...

If you really want it to power on, do something twice and then never do anything ever again it's best to put the something in setup() and leave loop() empty.

Steve