Idiom meaning "Why are you in a bad mood?", implying discontent with the other person's attitude. As it is a rhetorical question, no response is expected. Often used in situations where the person being asked is angry as the result of an underlying cause and therefore snaps at people who have nothing to do with this cause.
When someone is in a particularly foul mood first thing in the morning. Many people will have a cup of coffee before anything else is taken care of. Therefore their coffee must have been pissed in to start their day off so badly.