who wrote the bible and why