When pronounced as oo, that is.
ISTM - just based on thinking of words off the top of my head - that the difference is dependent on the preceding letter. For example, debut, cute, refute, mute, and repute have the “y” sound, while jute, lute, and astute do not. Similarly, rebuke, cucumber, puke have the y, while duke, fluke, juke, Luke, and nuke do not. Cube, hubris, and puberty have it while gubernatorial, lube, jubilee, rube, and tube do not. Supine does not.
Lining it up, we have bu, cu, fu, hu, mu, pu with the y sound, and du, gu, ju, lu, nu, ru, su, and tu do not. I can’t think of exceptions to this, though perhaps I’m overlooking something.
Questions are 1) is the above correct as general rules, and 2) if so, why is this?