Nomad uses a bin-packing scheduling algorithm by default which optimizes the resource utilization and density of applications. You can change this between spread and binpack via the update-scheduler-configuration API call.
The scheduling internals documentation has additional information on what can affect allocation placement during the scheduling process.