When the ESXi is being put in Maintenance Mode, the VMs are not migrated automatically to other hosts within the cluster.
The reason of this behavior is often due to the vSphere HA Admission Control feature that prevents VMs to be moved to the host that doesn't have enough resources to ensure failover capacity within the cluster.
Procedure
To put the host in Maintenance Mode for maintenance, right click the ESXi and select the Enter Maintenance Mode option.
You may receive a warning message that prevent the host to complete the procedure. To complete the process you need to manually migrate the VMs.
To automate the migration process, you need to disable the vSphere HA Admission Control. Click Edit button to disable the Admission Control.
Disable the Enable Admission Control option then click OK.
Check the Admission Control has been disabled.
Try putting the host in Maintenance Mode again. The VMs are now automatically migrated to other hosts of the cluster.
The host is now in Maintenance mode.
This policy change allows the system to automatically migrates the VMs during the ESXi Maintenance Mode request.