It is prescribed for benign prostatic hyperplasia (BPH; an enlarged prostate) which include difficulty urinating—not just for ED
I went on a yacht for the weekend, drank quite a few beers and crashed to sleep.
I awoke to find out I couldn't pee at all. I can't describe how painful things were by the time I staggered into the emergency department that evening. Definitely the worst experience of my life. A few weeks later a guy was winched off a boat by helicopter with the same condition - one of his mates had been tasked with catheterising him using the rubber fuel hose from the boat's engine, but was unsuccessful.
If you are having trouble urinating, seek medical attention - don't ignore it.