Aside from the relatively obvious use of the phrase (to
designate defecation), "take a shit" as a phrase can apply to
mechanical devices. An
apparatus which wears out or breaks down at a very inconvenient time can be said to "take a shit".
"I told Frank to fix those worn
lifters on his
car engine but he didn't listen to me. Then when he went on vacation he was crossing
the rockies when it took a shit on him. It ruined his vacation."