The way I understand it, the creature charmed would be "friendly" toward the charmer; that would include not attacking them, yes. However, as mentioned, this does not invalidate their opinion of anyone else.
This means, among other things, that they would probably still attack your friends and would not attack their friends. However, an opposed charisma check is all that is required to get them to do something they would not normally do. Generally, unless the creature has been raging against your pals for a few rounds or is just hard-core CE, getting them not to attack your friends probably doesn't require a check, but getting them to attack their allies probably does.
Also, note that casting this in-battle means they get a +5 to their save, which is why it seems so powerful - they have to fail their save and then you need to spend an action convincing it to "change sides" in order to get them to start attacking their friends. Also note, however, that all you have to do is keep yourself and anyone it thinks is your friend from threatening it to keep it controlled for the duration.