Assigning roles in Ansible playbooks helps in organizing and modularizing automation tasks, making playbooks more manageable.