The purpose of a dreamcatcher is to catch negative dreams and allow positive ones to pass through, promoting good dreams and a restful night's sleep.