Sometimes.
Not for funerals of people you knew well.
Your presence at the funeral, while symbolic (some might even say empty symbolism) is a way of showing the mourners that the deceased was cared for by many. It is comforting to some extent.
But of course, if funerals are too difficult, there are other ways to accomplish the same thing.
In the end... whatever. There are a lot of things that go into being a decent human being.
At the very least, I'm sure we'd agree on the big picture: the sum of how we care for our friends when they're alive is more important than what we do on the day of their funeral. So if you're being a good friend in other ways... hey, good on you.
Your friend almost certainly loved their family, and their family loved your friend. Although they may be gone, you can still keep that connective love alive by doing the same things for others that you’d do for your friend - sometimes, it’s as simple as showing up, even just once, for someone else.
Do you really have to fake that?
1 - Actively dislike the family
Sure, skip the funeral. If you & the family didn't get along in life there's no reason to put yourself through something you don't want to go to.
2 - Anything else
I'd go as a show of support for the family because the family was important to my friend. "It's what my friend would want" is the guiding principle here.
That said - I'm writing this as someone who was very uncomfortable going to funerals and now, years later, I regret choosing to stay home rather than go.
Your mileage may vary, as they say.