WHERE and HAVING test at different boundaries.
Moving a condition
A row condition and a group condition can use a similar number but answer a different question.
move changes meaning
Compare both boundaries
WHERE qty >= 3 outputs 2 groups; HAVING total_qty >= 3 outputs 3 groups.
compare boundaries
HAVING examples are tiny finite group-filter transforms; SQL dialect completeness, optimizer behavior, indexing, and product claims are out of scope.
Why they differ
WHERE removes small rows before totals. HAVING totals first, then tests the finished group.
before versus after
Summary
The boundary is part of the meaning, not a formatting choice.
same data, different boundary