Coupling reaction of β-naphthol with benzene diazonium is an example of electrophilic aromatic substitution.
If the electrophile attacks at alpha position ,then two resonance structures 1 and 2 , with aromatic rings are possible.
If the electrophile attacks at gamma position ,only one resonance structures 3 , with aromatic ring is possible and 4 is not aromatic.
Therefore attack at alpha position is the major product.
Mechanism of formation of 2-naphthol red dye (aka Sudan 1)