The blood isn't in your urine. As I understand it (and I'm certainly no medical expert, so apologies if this is incorrect) there are ducts in the prostate gland through which seminal fluid is forced into the urethra through muscular contractions when you ejaculate. What I understand is happening after a biopsy is that blood from the wounds in the prostate is leaking into these ducts and hence getting into the urethra. That's why the blood is generally only noticeable at the start and end of urination.
I hope I've explained that correctly. I'm sure that someone will put me right if not. I found that after my template biopsy is took several weeks for blood to entirely disappear when I urinated, and much longer (several months) to stop being noticeable when I ejaculated. It presumably depends, though, on how many puncture wounds were made in the prostate, how much they bleed, and how long they take to heal.
Best wishes,
Chris