This is just implementation feature. org.apache.karaf.client.Main class (which is used by bin/client script) is loading users.properties to java.util.Properties object - which is backed by (unsorted) Hashtable. And simply first non-group user is used as the one to be logged with.
It can be simply fixed by using LinkedHashMap, but I imagine it's better to explicitly specify "bin/client -u <user>" option.
Well spotted Grzegorz.
I think maybe its worth logging a KARAF ticket so they can improve this in a future release. Makes sense IMHO to always load those lines in order.