Biliary stents are inserted to relieve obstructions in the bile ducts. The primary objective is to restore the natural flow of bile into the intestine. The choice between percutaneous and endoscopic stent placement depends on the patient's specific condition and the nature of the obstruction.