Most money is also just a bit of code. There's more money than cash and nowadays the amount of cash is not tied to the amount of the gold, so cash would also be useless unless there was an agreement that it isnt. If many people agree that Bitcoin has value, it will have value. Such is the rules...