They could be the same, could be different. It can depend where they are in a bar, and what the time signature is. A lot of us still prefer to see 4/4 bars that split (to the reader) into two equal halves. The top version would, if it shows beats 2 and 3, not align to that ideal. But the bottom version would. If, in 4/4, the top version was on beats 1 and 2, or 3 and 4, it would work fine.
It can also be indicative of phrasing, although slurs do a much better job.
Depends on the Time Signature.
The first grouping would be ideal in Time Signature with minim beats, the beats are upheld but the subdivision of the beat aids in the reading of notes.
The second grouping is correct when you have crotchet beats because there is a grouping rule that says you subdivide the beats when you have semi-quavers in Time Signatures with crotchet or dotted crotchet beats.
I would read them both the same way. This is just differences in publishing style. My guess is that the first one is an older style.
A performer would play both versions the same way (you wouldn't accent the first note of every group or anything like that!). The differences are more for ease of reading / comprehension rather than performance instructions.
The top example (Hanon) might be grouped as 8-note sets to show where the finger pattern repeats (you use 1234 5432 / 5432 1234 over and over again, just starting on a different note).
The second example makes it a bit easier to see where the crotchet beats are. (4 per bar). You could group them like the first example, but it might be slightly harder to read that way.