Of course not all art has to be pleasing to the viewer, but confronting/challenging art is made deliberately that way by the artist, and the process of experiencing the art involves understanding the feeling and learning something from it.
It's a different feeling altogether to be discomforted by art, but for no purpose.