Because an ugly girl also happens to be a human being, with a mind, and a heart, and they are looking for the same good qualities and attributes that anyone else might be looking for.
That said, it's important to keep in mind that beauty is something that starts on the inside, and eminates outwardly, not the other way around.
When you hear someone say "What does he see in her?" The obvious answer is "something that you cannot."
Beauty is in the eye of the beholder.
Going after someone because they are beautiful is the wrong reason to go after someone. Likewise, going after someone who may be considered to be "ugly," as you put it, is equally the wrong reason.
It should be about attitude, personality, affect, heart...a person with the right qualities can never qualify as ugly to a person who sees the PERSON.