That’s quite a challenging question since I’m not really an art specialist. I guess the general purpose of art would be to provide some beauty or entertainment in the world. If you look at most of the classical art I think the focus is mostly beauty for example painting an exquisite picture.
But, I guess art has changed in recent years. Now art is used to bring a message across or even to shock. Like Banksy, even though his art isn’t really ugly, the focus is more on the message than how impressive the format actually is.
So, I guess it’s not only beauty, but also some form of mirror of what’s happening in the world, showing some critique on the current situation.
As to why people enjoy art? I’m not really sure everyone does enjoy art and I would say that many people have different tastes in art. I assume some people just enjoy looking at the extraordinary work, while others might just want to be confronted, or ask questions about the works of art. So, maybe it just depends on the person.