Barbaric acts of soldiers (mostly rape and murder of the civilian population) are never acceptable! But there might be a number of circumstances that might make it more probable that they happen. If soldiers have experienced a lot of brutality themselves, have been separated from their family for too long without any support, are unsure of their own life, and else have experienced a lot of stress, it might contribute to them not behaving like they normally would. Additionally, a group bonding might play a role (if they feel pressure to be accepted in the group of soldiers...)
To stop sexual harassment it is important to instill to everyone that we need to respect one another because that is where everything started. If there is no respect, we will find it difficult to look at other persons without being judgmental.