What is the purpose of an underpainting?
The reasons I like to use underpainting when doing art in oil or acrylic are:


Sometimes having small/subtle areas where the underpainting shows through can add interest to the painting. Some of the underpainting my not be so subtle, it can be vivid or even bright.
More layers of paint help the finished look. It can make your painting look cheap if it seems you are being skimpy with your paint.
It is a good way to build texture.
Cheaper, unappealing, or leftover mixed colors can be used up first, which means saving money and is more environmentally conscious than throwing it away.
Depending upon your support (canvas, wood, etc.) and its finish, meaning how porous it is, can determine how much paint will be sucked up. If you don't or can't add a layer of gesso, the underpainting can help seal the surface.
Once a painting is blocked in with an underpainting, details are easier to imagine and build on. This is especially true when it comes to the composition, shadows, and proportion.
You should regularly step away from your art to take a break and see it from a good viewing distance, which depends on the size, but at least 10 ft or more and the underpainting is easier to see, then the first step of a simple outline drawing.
It's good to practice, helps to figure out which brushes are working for that particular painting, and is way easier to make changes to both.