Ok so this may be a dumb question but I'm only 2 months into the trade and I'm having a hard time picturing and understanding the concept and purpose for switch legs and pigtails and when they are needed.
A switch leg is just a circuit design where you run a constant hot down to a switch, and a switched hot back. If a cable with just a black and white and ground were run to the switch leg, the white was used the white for switched hot - it's not a neutral. (The rules for this have changed but that's another question.)
So pigtailing ... it's done less in residential work. In residential work, you'll usually have a string of receptacles on a circuit daisy chained from one to the next. One romex comes in to each box to supply the receptacle in that box, and another romex cable goes out to supply the next receptacle in the string. Normally the termination is done without a pigtail: connect the two blacks / hots to the receptacle's two hot terminal screws, and the two whites to the receptacle's two neutral screws. There's a tab between the screws on the receptacles that connects them. (The tab is removable for certain wiring but normally it's not removed.) The tab is connecting the upstream to the downstream.
Pigtailing is done pretty much always in commercial work, around here at least. It may be a specification from the customer that you must use pigtails. There is a code rule for shared neutral circuits that you have to wire it in such a manner that if a device (such as a receptacle) is removed, it doesn't disconnect the neutral from anything else on that circuit. (BTW, shared neutral circuits are more common in commercial wiring.) When the downstream connection is through the tab as described above, that would not satisfy the rule. If you put a pigtail on the neutral terminal on the receptacle, and splice the neutral on the incoming supply, the neutral on the outgoing feed downstream, and the neutral pigtail, it satisfies the rule. If you remove the device, removing and capping the wires from the terminal screws, the neutral connection downstream is not affected.
I believe it would be perfectly compliant to pigtail the neutral and land the hots on the receptacle, but that's just not done - again, in commercial work, most people pigtail everything, hots, neutrals, grounds.
There are pros and cons to both methods that you can look to arguing over for the next 30 years or so
