A nephrostomy may be done for several reasons. It prevents the kidney from being damaged from a build-up of urine.