FWIW, I have seen AS hold connecting flights to Mexico before when one of the inbounds is late. I'm guessing there were no alternative booking options that day, so Operations made the decision to hold the flight for connecting passengers.
That said, I would think twice before booking a 40 min connection without any other alternatives that day.