Cholesterol and fatty acids role in bile?
The main function of bile is to emulsify large fat molecules into small fat droplets. You must have heard about micelle formation by soaps. Well, bile acids perform quite similar function. Bile acids, having both hydrophobic and hydrophilic parts, form micelles and trap fat molecules and form emulsion, hence naming the process emulsification. Similar function might be performed by fatty acids. See this article:


  Bile acts to some extent as a surfactant, helping to emulsify the lipids in food. Bile salt anions are hydrophilic on one side and hydrophobic on the other side; consequently, they tend to aggregate around droplets of lipids (triglycerides and phospholipids) to form micelles, with the hydrophobic sides towards the fat and hydrophilic sides facing outwards. The hydrophilic sides are negatively charged, and this charge prevents fat droplets coated with bile from re-aggregating into larger fat particles.
  


Now lets have a look on bile acids. The principal bile acids are cholic acid, chenodeoxycholic acid, glycocholic acid, taurocholic acid, deoxycholic acid and lithocholic acid, all of which are synthesized from cholesterol (see this). Now this partly explains why a small amount of cholesterol is released along with its derivatives; it might be the 'unprocessed' cholesterol which 'leaked out' from liver. But, in fact, it seems to do a bit more. Actually, cholesterol secretion into bile needs to be carefully controlled; too less secretion may lead to accumulation of cholesterol in blood vessels, leading to cardiovascular diseases (this is why cholesterol secretion is the final stage of elimination of cholesterol from reverse cholesterol transport), while too much secretion into bile may cause gallstones (see this). Hence, cholesterol secretion into bile also serves as a way to maintain cholesterol homeostasis (see this). In fact, bile acids serve as hormones in cholesterol homeostasis in the body. Similar reason may cause fatty acid elimination through bile.

Cholesterol and fats are hydrophobic, so they cannot be released as it is into GI tract. This is why they are released with bile. Bile acids are amphiphatic i.e. have both hydrophilic and hydrophobic parts. Hydrophilic part helps it in dissolving in chyme (containing HCl) while hyrdrophobic part helps it in dissolving fats and cholesterol (and lipids of course) into itself.

source