As mentioned earlier, the flight's return would've been treated as a domestic inbound and passengers would not have been required to clear customs. Since the flight returned due to a maintenance issue, the passengers did indeed qualify for hotel accommodations. The problem is that hotel availability in Miami has been extremely limited recently. As a stopgap measure, AA has been setting up cots in the terminal's auditorium, though it's obviously far from ideal.