Any immediate and heavy change in diet, particularly adding fiber from nutrient rich vegetables and fruits, can and will do that to you.
which is normally why you consult a nutritionist or dietary expert, and/or your physician when considering these changes.
[+]
If you ate Big Macs every day for 2 months, then ate a vegan diet for a day. Your body would flip it's ***and you'd feel sick etc yeah lol
It's about your body knowing what to prepare for, nutrient wise. So if you're going off the path, always expect repercussions like diarrhea or heartburn. (Stomach acid was prepped for pork tenderloin again today and you only ate Doritos and pizza? /goes nuts)
Generally speaking, the body can "balance" and "sustain" itself on unhealthy junk food meant more to fill you up psychologically and physically, than nutritionally, and any immediate and drastic changes to such a diet has resulted in serious injury.
Also, most leafy greens, like spinach, Romaine lettuce, cabbage, etc. flow through the body quickly, because it doesn't take long to absorb the nutrients, so it can cause what seems like irregular bowel movements as your body adjusts to something new, different, or otherwise uncommon.