Why was Jesus born in a stable?

In Luke: Jesus was born in a stable because Joseph and Mary had travelled from Nazareth to Bethlehem to participate in the census of 6 CE, but there was no room in the inn (Luke 2:7).

In Matthew: No, because Bethlehem was the home town of Joseph and Mary, and the wise men found Jesus in their house. Nazareth only entered the picture when the young family was returning home from Egypt after the death of Herod and realised that Judea was still unsafe (Matthew 2:11,23).

One thought:

He wasn't.

At least, the Bible doesn't say that he was, anyway. The word for "inn" actually meant "guestroom" - there was no guestroom available and Mary & Joseph had to sleep where the animals slept - typically on the first floor of a house in the home of a peasant. Animals were kept inside to protect them from theft, from the elements, and their body heat rose to the sleeping quarters generally located on the 2nd floor. Mary & Joseph did not have Jesus in a barn.

Another thought:

The Hebrew word 'Evus' is believed to mean 'manger'(feeding place / stall) and is translated 'phatne' in the Greek Septuagint, indicating the 'feeding place' of animals (Luke 13:15)(Proverbs 14:4)(Proverbs 15:17). In the Bible, Jesus is said to have been 'laid in a manger(phatne)' after birth (Luke 2:7,12,16), meaning the place where animals, specifically, are fed. This would indicate a 'stall'. This is in keeping with prophecies about the messiah's arrival being humble in nature (Isaiah 53:2). Some time AFTER his birth, when he'd become a 'young child' (as opposed to a 'baby'), he and his parents had moved to a 'house' when the 'wise men' (astrologers)arrived(Matthew 2:11), but his BIRTH was in an animal's 'feeding place' (believed by many to be a 'stable')because, as has been mentioned, there was 'no room at the inn', and babies come when they come. If there's no where else to have it, one has it where one must.
Luke 2:7 - And she brought forth her firstborn Son, and wrapped Him in swaddling cloths, and laid Him in a manger, because there was no room for them in the inn.

Luke tells us the literal reason, but the lesson that should be taken from the circumstances of Jesus' birth is one of humility.

If it was good enough for the Son of God to be "born in a barn," it's only appropriate that His followers reflect that humility in their own lives.

Luke 14:11 - "For whoever exalts himself will be humbled, and he who humbles himself will be exalted."

[Quotes from NKJV]
because Mary, (Jesus' mother) was not able to get any help from anyone in the village, so she went to a stable while Joesph was out trying to get help but the people there didn't answer their doors, and while he was trying to get help, Jesus was expected.