How does Bittorrent work in peers behind Carrier-grade NATs

There is a difference between "working at all" and "works well". In P2P networks each side of a pair of nodes should be able to initiate a connection and also to accept one initiated by the other side.

By default NATs make it more difficult or impossible to accept incoming connections.

So without doing anything special a torrent client will still work behind a NAT by establishing connections to those who can accept incoming connections. But that reduces the pool of available peers since it rules out similarly NATed or firewalled clients. In the worst case this can break the ability to participate in a torrent but on average it merely degrades performance.

To improve on that situation clients will try various NAT traversal techniques, NAT-PMP being just one of them.