Although Gertrude says the branch broke and swept Ophelia down the river, the church denies her a full Christian burial on the grounds that she killed herself.
Prevailing wisdom is that one of two things is at work here: Either an inconsistency in Shakespeare's writing, which is not uncommon -- his other works are fraught with them, though Hamlet far less than most. Or Shakespeare decided to up the ante on Hamlet's guilt. Gertrude could have not known the whole truth when she reported to Laertes and Claudius. She might have been trying to spare Laertes or to diffuse another tantrum on his part. The placement of the priest's admonition supports the suicide pretty solidly. So why did Ophelia do it?
Is Ophelia driven mad by her love for Hamlet, or is she the victim of a society that has created impossible expectations for its women? Had she the license to think for herself, Ophelia might have reasoned through her dilemma, but, caught as she is between her father's and brother's restrictive instructions and Hamlet's crushing demands, trapped as she is in a choice-less existence, Ophelia has no alternative but to throw herself into the river to drown.