The alternative would be to create expensive, full-scale sets such as the one shown above for the D.W. Griffith movie "Intolerance" from 1916. And for scenes in natural settings, the setting would have to be found, a production unit sent there and then might have to wait and wait for the correct atmospheric effect to appear. Better to build part of a set or film only a fragment of the countryside and then paint the rest. Much more convenient and usually far cheaper. As a result, most movie studios by the 1930s had teams of artists creating matte paintings. For a number of years use of matte painting was a kind of trade secret, studios fearing that audiences might feel cheated if they knew that many scenes were partly or even largely faked. Eventually, matte art became known and even honored at Oscar time.
For me and many other observers, one of the very best matte painters was Albert Whitlock (1915-1999). Background information on him can be found here, here and here.
Whitlock usually painted freely unless he was constrained by having to have his image merge with sound stage items with hard edges such as furniture, doorways, windows and other architectural or interior-decorative features. Another kind of constraint was that the painted part of the final image had to match the filmed part in terms of color, shadow angles and other details that, if not done with care, would reveal the painted part for what it was. Not the sort of thing most fine-art painters have to deal with. And by the way, some movies might require dozens of such paintings to be done under time constraints.
For more about all this, I highly recommend this blog. The Whitlock images presented below were shamelessly lifted from various posts. Click on them to enlarge.
Much matte work was to expand partially built sound stage interiors. This example shows the blacked-out area reserved for the action filming. This would be the part of the screen that attracted the audience's eyes, so the matte part didn't necessarily have to be crisply painted.
Part of Los Angeles following a hugely destructive earthquake. Impossible to create as a movie set, and difficult and costly if model buildings were made.
This shows Whitlock's free brushwork. It allowed him to create the painting more rapidly, yet the sketchiness wasn't detectable when seen in a theater.
This matte is of London's Covent Garden. Note the exaggerated perspective.
A good deal of matte work created atmospheric effects that could not be conveniently found when filming on location.
The airship Hindenburg was destroyed in 1937 and support facilities such as hangars are gone or have been changed since then -- so bring in Al Whitlock to create the scene.
Only the road and trucks are real in this composite.