How could a bot purchase bitcoins without paying for them?
Isn't the purpose of the blockchain to avoid issues with transaction integrity, such as duplicate transactions?


Trades on an exchange do not happen on the blockchain. Those transactions are not Bitcoin transactions; they are internal to the exchange and are just updates to the exchange's internal database. Because of this, duplicate transactions could happen without anyone really knowing.


  How would duplication of a transaction lead to the seller not getting paid?


The balance in an exchange account is just a number in a database and is not necessarily backed by that amount of actual currency. I believe what the authors are saying here is that the buyers and sellers would have their balances updated to say that they had X amount of money, but if they tried to withdraw, the funds wouldn't actually be there so that they could withdraw.