Here 3-wire cable serves a split receptacle. The bottom half of the receptacle is controlled by a switch and the top half is always-hot.
This wiring diagram illustrates wiring a light switch to control an existing receptacle outlet. The source is at the receptacle and a switch loop is added to a new switch. The hot source wire is removed from the receptacle and spliced to the red wire running to the switch. The black wire to the switch connects to the hot on the receptacle.
This page contains wiring diagrams for adding a new light fixture using an existing receptacle as the source. Diagrams include adding a light from a switched receptacle and tapping an always-hot outlet. Different wiring arrangements are included to allow for either the light or the switch to come first in the circuit.
A doorbell circuit for two or more doors will have a separate contact on the chimes for each button included. At the chimes, one wire from each button is spliced to the output wire on the transformer. The second wire is connected to one of the contact screws on the chimes.