The inn is the prison
In fact, "l'auberge" is an amusing and mocking way of referring to a prison for brigands in the Middle Ages. The coquillards, a 15th-century band of thieves, used the term "l'auberge de midi" to refer to the prison where some of their number were locked up. It has to be said that prisons provided room and board (of necessity!). You had to pay to eat, and the more you paid, the better you ate. In some Parisian prisons, you could even get an individual cell, or at least a more comfortable one, by slipping a "spice" (a tip) to the jailer so he wouldn't leave you in the worst dungeon.
A pen-and-ink drawing of the Bastille in 1791. Illustration chosen by monsieurdefrance.com: gallica.com
At the Bastille, the famous prison taken on July 14, 1789, prisoners were "guests of the king" (which they could have done without), who paid the minimum. But they were sometimes given a "chambre", or individual cell. Some illustrious prisoners could receive guests, their mistresses, their furniture, and even their valets to serve them. A sort of inn when you think about it, but one where you could stay for years.
The red inn hypothesis
Some say the expression comes from one of the greatest criminal cases in French history, the "red inn" affair . In Peyrebeille, in the Ardèche region of France, guests at an inn were raped and even murdered. When the case was revealed, it caused such a stir that the blood-soaked inn was nicknamed the "Red Inn". The proprietors and a servant were guillotined on the spot after their trial in 1833, so the expression comes from the fact that customers never left the inn. It's not true, but the anecdote is amusing. For the record, the inn still exists, where you can eat, sleep and visit a museum.