A pathetic fallacy can be a short phrase or a whole sentence and is often used in novels and poetry. Pathetic fallacies serve multiple purposes, such as:
Conveying the emotional state of the characters or the narrator
Creating an atmosphere or set the mood of a scene
Foreshadowing events to come
Giving texture and vividness to a piece of writing
Communicating emotion to the reader in a subtle way, by describing the external world.
Bringing inanimate objects to life so that they seem more relatable.