I don't think that the point was that there are no for loops in SQL. I think the point was that almost always using for loops is wrong and super inefficient and there is a much more efficient way to just use joins instead.
The reason people use a relational database is because it has loops that are faster, safer, and more efficient than anything you can write.
The point is that by getting rid of loops you remove one way of telling the computer "How" to do it. Start here, do it in this order, combine the data this way.
When "How" is a solved problem, it is a waste of your brain to think about that again. "What" is a better use of your brain cycles.
different kind of loops can be different, e.g. 2 nested loop with quadratic time:
for i in t1: for j in t2:
vs sort + merge join with n log n time.