Because '1'='1' is always true, the query returns all rows from the users table instead of a specific user.
This allows attackers to bypass login or extract entire databases without authorization.
Prevention Tips:
✅ Always use prepared statements or parameterized queries.
✅ Sanitize and validate all user inputs.
✅ Apply least privilege principles on database access.