This is an early fifteenth-century painting by the Master of Flémalle, who has come to be identified with Robert Campin. Campin was something of a pioneer; he took realism in painting farther than most of his contemporaries (although, as you can see in the painting above, he also is considerably influenced by the conventions of manuscript illumination), and was one of the first to experiment with the switch from egg-based tempera to oil.
In paintings we find two major traditions for the location of the scene: the Cave or the Shed. Both are usually highly stylized, with the animal shed, for instance, often being little more than a canopy. The Nativity at Night appears to be in the Cave tradition, while the Hohenfurth painting is very definitely in the Shed tradition. Here we have a remarkably realistic, and very rickety, old animal shed; the fact that the shed is virtually falling apart does multiple duty here by creating a contrast with both the Christ Child in the foreground and the castle representing the centers of power in the background, and also by opening up more space for painting, thus allowing us to get the ox and (behind the ox) the ass.
The Cave vs. Shed option is an interesting one. Of course, when we talk about Christ in the stable, in our sense of the word, we are appealing to the Shed tradition. In fact, neither Matthew nor Luke give us any indication beyond Luke saying that there was a manger available. It could very well have been simply an adjoining room of the house dug in a little lower than the main room to keep the animals out of the latter; or, if the house was near a cave, a cave is certainly a possibility; it's unlikely to have been an out and out shed, but a sort of crude approximation to one adjoined to a house can't be wholly ruled out, either, since the word for 'manger' can also sometimes indicate an animal pen or stall.
The Cave tradition, however, seems to have the longest history; Justin Martyr in the second century states unequivocally in the Dialogue with Trypho (chapter 78) that Jesus was born in a cave just outside of Bethlehem:
Joseph took up his quarters in a certain cave near the village; and while they were there Mary brought forth the Christ and placed Him in a manger, and here the Magi who came from Arabia found Him.
And Origen writing a little bit later also states it. The Church of the Nativity itself is in this tradition: the Basilica of the Nativity (the Orthodox portion of the Church of the Nativity) is built over the Grotto of the Nativity, an underground cave that by long tradition is the place where Jesus was born, and, even if not, has for over a millenium and a half done as a proxy for it.
As far as painting goes, of course, artists will paint according to customs and times; and paintings will tend to paint Jesus as where the animals are in the culture in which the painter lives. The rise of the standalone Nativity creche has probably also given a boost to the Shed tradition since the thirteenth century, since it is easier to have a standalone stable than a standalone cave. In painting, the Shed tradition allows one to have a richer background than the Cave tradition; as with the painting above, the Shed tradition allows one to paint the Christ Child as situated within a much more vast world, while the Cave tradition instead puts greater emphasis on the foregrounded figures.