Understanding unexpected results using SELECT and GROUP BY

Doing lession 8 in aggrigate functions, and im challenging myself to write the code without looking at the example.
this exercise wants me to type:
SELECT price, ROUND(AVG(downloads), 0) FROM fake_apps
group by price;

I first chose SELECT name instead of price, and still grouped by price.
the results contained app names, and im wondering how it determined which app name to display given the incorrect code i wrote.

thanks in advance for any info you can provide