We spend a lot of time at work. For many people they spend more time with their colleagues than they do with their family and friends. In these circumstances, it is only natural that as the working relationship evolves, the environment develops in such a way that people can find opportunities to let off steam by laughing and joking with each other.
Many employers actively encourage employees to find ways to make their work fun because, lets face it, a happy employee is more productive and none of us want to spend the day with a lot of miserable people.