Fluid for bile pigment testing is done to check the levels of bilirubin, a waste product formed during the breakdown of red blood cells, in a fluid sample. It helps in the diagnosis of liver or bile duct disorders, such as hepatitis, cirrhosis, or gallstones.