Read the following fable by Aesop.

Why the Bat Flies at Night
Once upon a time, there was a war between the animals of the air and the animals of the land. The eagle would hunt and eat the rabbit. The owl was never safe from the fox.
The bat had wings like the flying animals, but it had teeth like the land animals. Unsure which side to join, the bat joined whichever side was winning. When the air animals were ahead, the bat fought along with the air animals. When the land animals won a battle, the bat joined them.
After many years, both sides decided to end the war. There was peace across the earth. But the animals could not forget what the bat had done. Both the air animals and the land animals felt tricked by the bat. They decided to drive the bat away.
And that is why the bat hides away during the day and goes out only at night.
What is the main theme or lesson of the fable?

The main theme of the fable is the consequence of being indecisive and opportunistic. The bat's inability to choose a side and its opportunistic tendencies led to its isolation and the development of its nocturnal behavior.