Questions on GROUP BY I

So I was doing the Aggregate functions exercise “GROUP BY I” and had a question on why when I wrote

SELECT category, SUM(downloads)
FROM fake_apps;

Did it return with only the ‘News’ category and the total sum of downloads for the table.

I understand that by not adding in the GROUP BY line I didn’t specify the connection between category and SUM(downloads), but how did the system choose News as the category?

I believe my specific question is how exactly did the system respond to that line of code, because I don’t understand the logic it used to produce the result it did.

This is because SUM(downloads) only returns one value which is the sum of all downloads and results in one row. Thus, it only selects the first category which is news I believe which corresponds to that row!

If you add a group by statement , it will only then count the sum of downloads for each category and return the correct result.