http/https mirrors with expired certificate is written to mirrorlist as https
As pacman-mirrors probes the mirrors it loops the available protocols which has been sorted in decending order so it probes https first and secondly http etc.
The first probe assign the mirror a response time of 99.99 to the https protocol but as the subsequent probe on the http protocol returns a valid response within the alotted time the mirror now gets the new response time of s.mss.
When the mirrors is written to the mirrorlist - again https is proritized over http and since the mirror now has a valid reponse time the https protocol is written to the mirror list.
The behavior is expected - what is not expected is a mirror to have an expired certificate, which in this case results in undesired behavior.