Polar Bears are a quite simple mechanism, made to survive the arctic winter.
Whatever moves is labeled FOOD, and stationary objects with another colour than snow, ice and rocks is labeled POTENTIAL FOOD.
The evolution never made space for mankind in the mind of the Polar Bear, and they have no natural fear of humans.
We can argue about what went wrong untill we turn blue, but in the end we have to reach the conclusion that this was another tragic event, and we have to learn from it.
Hopefully they (Norwegian authorities on Svalbard) will start some kind of mandatory training/course in order to minimize the risk of confrontations between humans and bears in the future.
Choice of camp site, safe procedures concerning the handeling of food and waste, guard routines, and rigging of trip-wires is essential here.
Reports mentioned that the trip-wires failed, unfortunately that is most often linked to human error.
Depending on the age and type of trip-wire used, they should be fool proof.
The main issue is to secure the pole/post that supports the flare, to anchor the wire positively, and to remove the safety-pin.
Not saying that the trip-wire itself will drive the bear off, though the bang, the flare, and the whistle will confuse the animal for a moment, but it will alarm the people within the perimeter and give them a chance to prepare themselves for the attack.
Sad story anyway.