your code goes linear, which means your computer processes everything from the top to the bottom.
What a loop does, it keeps on going till its done, and then the allows the actions below it (that are outside your loop) to be executed.
so lets test your loop, lets say you have 2 players (example).
First time your loop, loops, it checks your condition, and lets say it's true, you save your point in your variable, and you ping at the variable position.
Now your loop loops for the second time, and lets say it's true again, you save a new position in that variable again, and you ping again.
Your loop ends and you remove the point.
Now what happens is that the second time you gave your variable information, it overwrote your first information, causing a point to go missing.
The second time you gave your variable information, you removed it neatly but thats just because your loop ended.
Imagine you have 12 players, and all of them conditions are true, you would have made 12 points to ping to, but only removed one.
I hope that answers your question as to why, if not, I could explain it a bit more detailed I guess.
As to question, yes you need to put the custom text call under your ping action, cause else it will not remove the point you pinged at right after you used it, but once the loop has ended.