Why would there be blood in urine for many months?

Many reasons. Are there other symptoms? Infection, kidney or bladder stones, cancer can all cause blood in the urine. See a urologist to get tested.
Several reasons. Bladder, prostate, or kidney cancer can cause ongoing blood in the urine. Other less serious causes include kidney stones, infections like stds or urinary tract infections, blood thinners, injury to the kidney, or even very strenuous exercise. Certain kidney diseases, called glomerulonephritis, also cause bloody urine. This could be serious and is something to see your doctor about!