Here's why:
* Up quarks have a positive fractional electric charge (+2/3e).
* Electrons have a negative electric charge (-e).
Since they have opposite charges, they attract each other via the electromagnetic force.