I came across this question and I've been thinking about it since, without being able to find a convincing major product. This question is related to one I found on this site, Diazo Coupling reaction with para-substituted phenol?, but it doesn't totally clear my doubt, and hence I specifically posted this reaction.
My thoughts were, since benzene diazonium is a weak electrophile, it would prefer to attack the most nucleophilic or electron rich site, and $\ce{-NH2}$ being better nucleophile than $\ce{-OH}$, I feel that would be more preferred site of coupling. Also I found out that aniline reacts with diazonium in basic medium to form diazo-aminobenzene which later rearranges to form more stable amino azobenzene; only to support my opinion. Thus my product was:
But the actual answer given was ortho coupling w.r.t. to $\ce{-OH}$, and it supports the product shown in the previously mentioned question, and @orthocresol commented that it occurs due to formation of phenoxide in basic medium:
But still it wasn't very convincing for me, as no one posted a solid answer to the question, neither are their any suitable articles I found on the internet that compare the reactivities of different functional groups towards diazonium. I would be very obliged if someone could provide a deeper insight to the matter, and clear my misconceptions(if any), and a critical view about the barriers or aids in formation of the products.