As Salesfoce follows a multi-tenant architecture, that necessarily implies you cannot make unlimited number of queries or use any unlimited resources.
The reason why you should not use SOQL within for loops is to avoid governor limits. This holds true irrespective of what you are querying for. Here's the motivation for advice why you should not write SOQL inside loops (refer to this link for details).
By moving queries outside of for loops, your code will run faster, and is less likely to exceed governor limits. A common mistake is that queries are placed inside a for loop. There is a governor limit that enforces a maximum number of SOQL queries. When queries are placed inside a for loop, a query is executed on each iteration and governor limit is easily reached. Instead, move the SOQL query outside of the for loop and retrieve all the necessary data in a single query.
As for your question -- You should not (at least try to avoid) queries within loops and try to utilize the best practices which ultimately yields better performance for your application.