@MS Techie , thank you for reaching out to us. Happy to help. As I understand, you are referring to below situation:
availability set is a logical grouping of VMs that allows Azure to understand how your application is built to provide for redundancy and availability. It is basically your way to get an SLA of 99.95%, provided you put 2 or more VMs in it.:
If you are interested in detailed working of Availability Sets, I would recommend you to check out How do availability sets work? and Understanding Azure Availability Sets.
Each virtual machine in your availability set is assigned an
update domain and a
fault domain by the underlying Azure platform. Microsoft periodically updates the underlying Azure fabric that’s used to host VMs to patch security vulnerabilities and improve reliability and performance. These updates, which Microsoft refers to as
planned maintenance events, are often performed without any impact to guest VMs. Sometimes, however, guest VMs must be rebooted to complete an update. To reduce the impact on guest VMs, the Azure fabric is divided into
Update Domains to ensure that not all guest VMs are rebooted at the same time.
Unplanned maintenance events are those which involve a hardware or physical failure in the fabric, such as a disk, power, or network card outage. Azure automatically fails over guest VMs to a working physical host in a different
Fault Domain when an error condition is detected, again aimed at ensuring availability.
So, if you are manually shutting down your VMs, they will (like you can still have 1 VM in availability set and which will not provide you the desired SLA as mentioned in here). In summary, this behavior is expected.
Please do not forget to "Accept the answer" wherever the information provided helps you. This will help others in the community as well.