Ressler finds out she betrayed him, and she reveals that she also tipped Liz off earlier so she could escape a restaurant before the FBI raided it.
Both vulnerable, they end up sleeping together.
Knowing this, they laced the dye at the manufacturer's end, which allowed them to track everybody who owned one.