A 28-year-old female comes to the clinic with a chief complaint of right flank pain urinary frequency and foul-smelling urine

A 28-year-old female comes to the clinic with a chief complaint of right flank pain, urinary frequency, and foul-smelling urine. The symptoms have been present for 3 days but this morning, the patient states she had a fever of 101 F and thought she should get it checked out. Physical exam noncontributory with the exception of right costovertebral angle (CVA) tenderness upon percussion. Urine dipstick shows + blood, + bacteria and + white blood cells. Renal ultrasound reveals right staghorn renal calculus and the patient was diagnosed with acute pyelonephritis.

Question:

How does a renal calculi calculus contribute to acute pyelonephritis?