>Was Puerto Rico unaware of this when they took out the loans?
The fact that it went to the Supreme Court of the US [1] means that it is unprecedented and required the highest court in the land to interpret the law means that no parties were fully aware of how Bankruptcy would hold.