There may or may not be all that much of a connection between the two. That's been the subject of debate for a long time.
I personally believe that Nizoral is beneficial for male pattern baldness (assuming that it really _is_ beneficial for male pattern baldness) probably mainly because ketoconazole has antiandrogenic properties.