Originally Posted by email@example.com
Can someone give me some ideas on which program is responsible for creating the default folders?
I think you mean trash, sent and drafts?
They are created because some mailclient is ordering to do so (so in your case probably squirrelmail). The folders and their structures are created and maintained by courier, but luckily courier does not autocreate anything.
Subsequently your mail client can order courier to create, modifie and delete all other folders you wish to handle.
By the way, the inbox and initial structures are created when the first message arrives.