There's not really any training for garbagemen. They just pick things up as they go.

Why this joke works

Learning Along the Route

To pick something up can mean to learn it informally. Garbage collectors also pick up discarded objects while moving along a route. The closing phrase therefore describes learning and collecting at once. Treat the opening as the joke's deliberately silly premise, not a factual claim about qualifications. The humor belongs to the shared wording, rather than to any suggestion that the work requires no skill.

A closer look

Two activities along one route

As they go is more than a filler ending. It fits gradual learning and a collection round that moves from stop to stop, so it keeps both interpretations alive after pick things up. This joke is best shared as a language turn. Avoid directing it at someone's occupation or using it to dismiss the training their work requires.

Fact behind the joke

The range of a phrasal verb

Pick up is a phrasal verb with several dictionary senses, including acquiring knowledge and lifting or collecting something. The particle up helps create meanings beyond the verb pick alone. That flexibility lets the joke describe two different activities without replacing any words in its ending.