The answer to this question relates to John's family and his parents, and the way that they live such a boring life. His father in particular wants John to work in the stock exchange, like he does, and places him under considerable pressure. The text contains numerous references of arguments that they have had and continue to have, and John's habit of refering to his father as "The Bore" clearly indicates the feelings he has for him.
It is as a response to this pressue and the kind of lives that his parents lead that John tries to compensate by adding excitement and amusement to his own life. This is why he carries out pranks to entertain both himself and others. Although he is, at heart, a good kid, and is perfectly intelligent, it is his family situation that has made him into the kind of character we see in this brilliant novel, a character who is very restless and pent-up, and one who is definitely not understood by his parents.