Pistols, like any tools, are designed to perform a certain set of tasks. Objects whose function dictates their form are inherently beautiful. Since they perform their task as well as any other pistol made, Glocks are beautiful.
I've never heard anyone describe another tool as "ugly". Are there any ugly hammers? Chainsaws? Arc-welders? Garage-door openers?
Cars are a different story, in some cases, because essentially your car is your clothing when you're on the road, and there is value in looking good, even at the expense of functionality. Unless you're going to be showing your gun to everyone, get the one that works the best.
P.S. Full disclosure: I own only one gun and it's a Glock 17.