There are many cases where the same fact might be supported by either hearsay evidence or direct evidence and the hearsay evidence is better. Here are a few examples:
You want to prove that a particular gun was sold at a particular store on a particular date.
Hearsay: A witness that works at the gun store testifies that she was told by her manager that he sold that gun on that date at that store and that she recorded it in the store's business records.
Not hearsay: The manager testifies that he's pretty sure he remembers selling that gun on that date.
You want to prove that a particular person was at the scene of a particular murder:
Hearsay: A witness testified that they heard the person describing the scene of the murder and described details not released to the public.
Not hearsay: A witness testifies that they saw someone who really looked like that
person leaving the scene of the murder.
You want to prove that a particular person commanded their subordinates to engage in a conspiracy that benefits that particular person:
Hearsay: The subordinates testify that they were directed to engage in the conspiracy.
Not hearsay: The particular person states on television that he directed his subordinates to engage in the conspiracy.
Actually, the subordinates testifying is not hearsay. If you're trying to prove that Alice told Bob something and Bob testifies that Alice told him that something, that's direct evidence. Alice was a direct witness to Bob saying that. That is not hearsay!
Say Charlie overheard a phone conversation between Bob and Alice. Charlie testifies that he heard Alice say to Bob that she would kill him if he didn't pay her money. That could be hearsay if we were trying to prove that Alice actually would kill Bob. But if we're trying to prove that Alice threatened Bob, Charlie is a direct witness to the threat. There's no hearsay involved.