I read that 浴びる is a transitive verb, but if it means to clean, then shouldn't it's object be what's be washed? The examples I see have the object of the verb as what one is using to wash with or bathe in, e.g. water, sunshine.
The verb 浴びる expresses something like be showered with [DirectObject]. Common literal uses include liquids such as water (水を、シャワーを) and rays of light (光を、日光を、月光を、日差しを), although it can be used with anything you can be showered by. It doesn't need to be translated as showered by, though; 月光を浴びた could be bathed in moonlight, basked in the moonlight, etc.
This verb can also be used more figuratively. For example, the object can represent criticism (非難を、批判を), cheers or applause (称賛を、喝采を), or attention (注目を). Any of these could be translated with shower figuratively in English: she was showered with attention or showered with praise, and so on.
Note that this doesn't translate very well to clean. Although you're likely to get clean if you take a shower, you're not so likely to be cleaned by having praise rained upon you or by basking in moonlight.
You can, however, use an object to express what is being showered upon. To do so, you need to use the ditransitive causative verb corresponding to 浴びる, which is 浴びせる. This verb means something like cause [IndirectObject] to be showered by [DirectObject]. And as you might expect, the indirect object of 浴びせる is marked with に. Here are a few examples adapted from ALC putting it all together: