This does happen a lot during takeoffs and landings (bins opening) and as John already stated, UA's policy is that we are NOT to get up during that phase of flight. The same goes for responding to the call buttons.
It is always a tough call for me because you try to weigh out which would be worse, closing the bin or potentially injuring yourself or others. Generally I make the decision based on how steep the climb is at that particular moment and how far away the bin is.
Obviously passengers are not supposed to get up either but I certainly understand why they would if they were close enough and would never presume to lecture them about it later. Technically it is our job to tell the passenger to sit down if we see them get up so the f/a in this instance did nothing wrong. I do understand the OP's feelings though.
Tough call and always an uncomfortable situation.