This is done mainly to reduce the cooking time of beans and chickpeas. Of course, if you have a pressure cooker or patience and enough free time, you can cook beans and chickpeas without soaking them.
The soaking time for beans and chickpeas varies depending on whether the water you pour over them is hot or cold. If the beans are covered with boiling water, then they can be left to soak for only 20 minutes before being boiled. The same goes for chickpeas.
Of course, if you have the necessary time, it is advisable to soak the beans and chickpeas from the night before. Some people who value natural and proper nutrition even preach that beans and chickpeas should be soaked for at least 18-24 hours and then should be replaced with new ones every few hours.
It is important to note that it is not fatal if for one reason or another you forget to soak beans and chickpeas from the night before or the soaking time is less than specified in the specific recipe. This simply means that you will have to cook them a little more to for them to boil and soften.
As a rule, the water in which you have soaked the beans or chickpeas is discarded, the legumes are covered with new water and boiled. If desired, the first water for both chickpeas and beans can be discarded after 10 minutes of boiling, after which the boiling is continued until the products are ready.