This is actually a pretty astute social observation for a character that is often played as stupid. This is not stupid. This is very likely the real unvarnished truth. There are rules that do not apply to the gentry, to the upper crust, to the wealthy. Rules are stringently applied to the poor and loosely to the privileged.
Now – in this case, we don’t know that Ophelia is NOT due this Christian burial. By Gertrude’s account, she drowned by accident – so it’s perfectly acceptable to bury her legitimately. But – with even a whiff of doubt, a poor woman would have likely been shifted to the doubtful corner. A noblewoman, a gentlewoman, enjoys the benefit of the doubt and a poor woman, if there is any doubt, does not enjoy any benefit. There is no benefit of the doubt for a poor woman. Probably a priest is expensive.