An ape could compose atonal music, but not in a billion years a classical sonata.
Atonal sucks.
As j_menz points out, "atonal" is an imprecise term and, speaking as someone who composes almost entirely tonally, atonality (insofar as it might be thought to exist - and it means different things to different people, hence j_menz's comment) is a part of an expressive vocabulary.
Vacuum cleaners suck (when they're working properly); apes neither compose atonally or "classically" nor operate vacuum cleaners.
Best,
Alistair