Every behavior has a purpose or function whether it is to get something, avoid something, or just to make yourself happy. Think about it this way: When it is cold outside, you put on a coat before leaving the house. Why? Well to prevent yourself from getting cold, of course! The function of putting on a coat is to avoid the cold and stay WARM.