Were these market conditions so unfavorable for AIB or was the Irish bank so weak that it had no choice but to sell its Polish assets to survive?
Pretty much. The Irish government had no choice but to sell BZWBK - they needed the cash to inject into AIB, and their hand was really forced.
Either way, this is the worst possible deal for BZWBK employees - Santander have a long established model of moving into a new market, rebranding after a while, then culling all the back office jobs and sending the jobs to Spain instead. On the other hand, it does mean that Poland has another large, stable bank.