This will probably get listed as a bug fix, and I believe that there were always instances of it doing this...
Unfortunately, it stems from a misunderstanding of the word 'Hostile'. The spell 'friends' is a cantrip that mentally compels a person to be friendly and helpful, temporarily, and when it wears off they are aware that you manipulated them with magic in this way; the spell text describes this and says that the affected target becomes hostile. What this means in D&D terms, is that the npc is shifted to the hostile disposition, which simply means that they are unwilling to assist you or expend any effort or risk for your sake; that they are ill-disposed towards you and are belligerent and unhelpful in manner. Hostile is a social disposition - alongside neutral and friendly.
Far too many people take the words of the spell in a video-game style, even in tabletop and assume it means 'they attack' - that's not what it means at all, but it's common nomenclature in video games to that effect, and that's how a lot of people mistakenly treat it. In particular, especially in game translations into video game format, this mistake is almost universal.
In this game, I believe what they've done with it is that it gives them an immediate negative 75 (or thereabouts?) in their disposition towards you when the spell ends, and if that brings them low enough they'll go video-game-hostile and attack. It they like you a lot beforehand, though, they might not, and will just hate you. Of course, if they like you that much before you cast the spell, there's probably no need to cast the spell...