He shot his arrow through the seven trees because it was a challenge. It was done to prove his strength, valor, and skill. Not only did it do that, but it also pierced a mountain, entered earth, made a circle and came through the other side and went back into Rama's quiver.
I believe that an unhappy ending can do that.
When a story has a happy ending, then you finish it and you feel satisfied and joyful about how the story ended. On the other hand, if the story ends in an unhappy manner, you start thinking about the resolutions and imagining what could lead to such an ending and how it could be fixed.
Odysseus blinded Polyphemus, and now Poseidon is angry and seeks to avenge his son. Further, Tiresias predicts trouble when the ship reaches Thrinacia, where the "fat flocks" of cattle belonging to the sun god, Helios, live.