It is important to first consider the societal context of Elizabethan England to appreciate how Shakespeare's audiences would have reacted to suicide. In this era, suicide was seen vile; those who took their own lives were often put on trial even after death, and if found guilty, their heirs were sometimes punished. Their wealth was transferred to the crown, and they were denied Christian burials. Families could often petition for a legal judgement declaring that their loved one be found non compos mentis (not in her right mind), but this was exceedingly rare.
Ophelia's death is community gossip, as evidenced by the conversation between the gravediggers who open act 5:
Is she to be buried in Christian burial when she willfully seeks her own salvation?
I tell thee she is. Therefore make her grave straight. The crowner hath sat on her and finds it Christian burial. (v.i.1–5)
The gravediggers don't seem to buy the story that Ophelia "drowned herself in / her own defense" but is instead being given special treatment because of her position at court. Because she is a "gentlewoman," she is receiving a Christian burial that others would not have been given in the same circumstance.
It's also worth noting that Ophelia's death occurs offstage. In many ways, this represents the passive role that has been expected of Ophelia for the duration of the play. She is the pawn of various men in her life: her father, her brother, and Hamlet. Expected to perform to their wishes, Ophelia lacks a voice of her own and has no real source of support for the emotional distress that these expectations demand of her.
While it is unclear whether Ophelia climbed the "willow [which] grows aslant a brook" with the intention of killing herself, she did end up in the water as a result. At this point, Ophelia made no effort to save herself and simply allowed the water to soak her clothing and drag her to the bottom of the brook. Brooks are typically small and shallow, which means that Ophelia should have been easily able to save herself. Her death therefore seems to be no accident, but an intentional effort to take control of her life in this one final gesture, shaping her own destiny in a way that defies society's expectations of her.