This Arthur Schopenhauer quote is in Susan Neiman’s exceptionally interesting book, Evil in Modern Thought (Princeton 2002, p. 203):
[T]he astonishment that urges us to philosophize obviously springs from the sight of the evil and wickedness in the world. If our life were without end and free from pain, it would possibly not occur to anyone to ask why the world exists.
Here’s a portrait done of Schopenhauer when he was a young man:
Source: Wikipedia Commons.