In your example, are you saying that the guard you cast Friends on immediately became hostile, or only the surrounding guards? If the latter...then I think that makes sense, if maybe a bit extreme. You did just use magic to influence the mind of their ally; they don't know your full intentions. The casting of Friends is inherently problematic, in addition to any specific things you ask a target to do while Friendly.
They were inside trying to get the next door open and the spell expired after a minute as I was rescuing some one. It took me a while to figure out why they'd gone hostile at all.