I thought a lot of airlines had rules to limit the number of attempts you could make at a single airfield in an attempt to prevent this exact kind of situation.
It sounds to me like they tried harder at their intended destination than maybe they should have, followed by going to an alternate airport that probably wasn’t a good choice in the first place, and then having to divert to the final airport where luckily they could land in time.