Even without money, a house would cost something - you would have to get the building materials, the ground to build on, and the time and work to build it. This has nothing to do with banks. The banks just help you to pay the cost upfront.
There are other ways to do it, like the Amish coming together and building a house in a day. They still use a lot of work hours, distributed over many people. And it only works out if you are also Amish and "pay it forward": for now, you give other Amish "credit" by helping build their houses. When your turn comes to move into a house, you'll get that credit back because they help you build your house. That sounds great, but it doesn't provide the freedom banks do. If for some reason you don't want a house in an Amish community, you won't get your credit back. Islamic solutions have similar issues (credit is illegal, so they either borrow from non-muslims, or they also have a "pay it forward system" where every member of the community chips in when somebody wants to marry and build a home).