Your joke doesn't make any sense, though It should be; "Why doesn't a chicken wear underwear?" "Because its wiener is on it head."
The underwear thing I agree with. Changing pecker to wiener makes no sense. Chickens peck. That's why pecker is used. Chickens don't do anything that has any regard or reference to a wiener.