Same for things like "tune the amount of worker processes depending on the amount of CPU cores the machine in question has".
Some bash commands are idempotent too (e.g. apt-get install), but it's not something you can rely upon, and you often have to code the idempotency in yourself.
* Your servers are all kept in a known state that is described by your code. If you don't have configuration management, you have to remember that postgres is installed on X server and has Y configuration. Which is ok for simple configurations but quickly becomes a total mess for semi-complex configurations.
* You can go from a clean server to a fully fledged working server (or set of servers) in a single, repeatable step.
* You can remove repetition from your code base and decouple your server configurations. Database password needs to be used in six different places? No problem. Specify it in one centralized configuration file and then just use template variables to make it appear wherever it needs to be upon deployment.