The 'sludge' is stored inside special liver cells themselves,
when you introduce a vast amount of fat into your stomach a hormone is released which tells the liver to start producing a vast amount of bile.
Those hormones activate your liver function and the detox process
begins, the grapefruit helps with this as it contains detox enzymes so the liver 'dumps' whatever the cells are holding onto.
Sometimes this process is weak and the sludge just hangs around
the bilary system causing inflammation but can move out.
The pancreas also introduces bicarbonate which mixes with the
bile in a way that produces a gel like sludge which is just
the start of chyme.