If people are presented with an ugly user interface, they will most likely want to complete what ever task they’re undertaking as quickly as possible. This will lead to more mistakes, and the user is likely to overlook features of the user interface in their haste to get the job done.
Conversely, if you’re presented with an aesthetic user interface, it’s more relaxing, and the user won’t be in such an immediate hurry to complete the task. This puts them in a mental state which is more receptive, meaning they are more likely to better understand the user interface, and make fewer errors.
So an aesthetic user interface is also a functional one!