Thai banks are extremely fussy about the physical condition of your foreign currency. Bills that have marks on them, creased or wrinkled will NOT be accepted by most banks.
If you plan to come to Thailand, make sure your currency bills you bring are in pristine condition.
It is odd that the bank will take a brand new, pristine US $100 bill and give you back a bunch of old, wrinkled and dirty baht.
Please make sure your currency exchange bills are pristine condition.