I think a lot of it stems from the addiction to nicotine. Going through withdraw, no matter what substance, will leave people feeling cranky and irritable, at least until the drug is mostly out of their system but likely continuing until the person can get a grip on their situation (ie, you may be fidgety and anxious about wanting a cigarette a few weeks after quitting, and so you may be irritable because of this). By having a cigarette, even one, you put an amount of the drug back into the system, you move back to Square One and have to go through the withdraw process all over again. This could lead to a perpetual cycle of crabbiness.
Then again, there are people who are irritable and bad tempered who don’t smoke. There are many things in our lives that can cause us to become like this, or we may just have a tendency to be like this for whatever reason. So even if I knew approximately how many days the overall withdraw period for cigarettes is (and for some people, there is no end period, they must remain diligent all their lives, this is commonly seen with alcohol), I would never feel confident in saying a precise number of days, because it will vary from person to person.