I'm not sure exactly how it works, but from the tests I ran, it looks like the number of rows returned by using distinct is the column with the max number of distinct entries.
So, since you're using id, which is different for every record, probably, it's got the most distinct entries. So it's going to return all of those and you'll get duplicates for bgroup. It doesn't matter what order you put them in either.
The suggestion by Kai was a good one. Create a database like this:
table2
+-------+-------------+
| bg_id | bgroup |
+-------+-------------+
| 1 | Accounting |
| 2 | Sales |
| 3 | Engineering |
+-------+-------------+
Then save the number in the original table, rather than the name. Then, when you want all the bgroups, you do
select bgroup from table2;
It'll make things easier in the end...
---JH