Most of us are going to be sympathetic to a mourner’s needs, and if he can’t face people at that time, we’ll make allowances.
Yes, a funeral is a social occasion, and people want to interact with the principal mourners. It’s a social grace, to shake hands with, or hug, the widow (etc.) If they hold aloof, it has the superficial semblance of rudeness.
(“Well, they’re too self-important to accept sympathy from me!”)
But it ain’t rudeness if you’re so stricken with bereavement that you can’t handle the interaction. I’ve seen it happen. At my b.i.l.'s brother’s funeral, my b.i.l. sat, unmoving and unspeaking, through the whole deal, and he said later it was one of the worst ordeals of his life. He had to be there, but, were it up to him, he’d have skipped it entirely and just gone fishing. He was suffering.
Fortunately, pretty much everybody “got it” and left him alone.
To the best of your ability, trust people to be good. (But…there’s one jerk in every crowd…)