“Shebang” means everything involved in what is under consideration (usually used in the phrase “the whole shebang”).
We don’t know where the word came from. It appears suddenly in the 1860s, dozens of times in US newspapers and literature.
The earliest known example of the word in print appears to mean some form of hut or rustic dwelling. Walt Whitman’s Specimen Days, from Complete Poetry and Collected Prose, 1862: “Besides the hospitals, I also go occasionally on long tours through the camps, talking with the men, &c. Sometimes at night among the groups around the fires, in their shebang enclosures of bushes.”
In Suzanne Wilson’s Column South (1960), an 1864 diary records officers during the Civil War as “running the shebang” which seemed to refer to a whole encampment or other military establishment.
In 1869, the Marysville Tribune printed a list of The Idioms of Our New West and defined ‘shebang’ like this: “Shebang is applied to any sort of house or office.”
In Roughing It, 1872, Mark Twain uses ‘shebang’ to refer to a form of vehicle. “Take back your money, madam. We can’t allow it. You’re welcome to ride here as long as you please, but this shebang’s chartered, and we can’t let you pay a cent.”
That vehicle usage may suggest a possible link with the name for a form of early UK sightseeing bus, a charabanc (pronounced sharra-bang). Passengers called these vehicles ‘sharras’ which were common in Britain from the early 1800s into the 1970s. It’s possible that “shebang” is a variant of “sharra-bang” but there’s no evidence.
Perhaps it didn’t matter that “shebang” was used to mean different things. It’s much more interesting to say “shebang” than just the common, everyday, old “thing.”