Let's take a look at 78XX regulators' internals first:
simulate this circuit – Schematic created using CircuitLab
The inner box contains all the pre-drive stuff so even without any load this block still draws current. And according to the simulation model this no-load current is about 4 mA which sounds reasonable. So the loss of this block is:
$$
P_{idle}=V_{in}\cdot I_{bias}
$$
The output transistor (Q1) is the big guy. The load current flows through it and the power it dissipates is the biggest (generally) portion of the total loss:
$$
P_Q=V_{CE}\cdot I_C=(V_{out}-V_{in})\cdot I_{out}
$$
So the total loss of the linear regulator is:
$$
P_{loss}=P_{idle}+P_Q
$$
When we calculate a linear regulators' loss we normally take PQ loss as the total loss. Because we normally care about the loss more when the load current is relatively high so we just neglect the idle loss. For example, if the load current was 500 mA instead of 10 mA, the loss of the output transistor would be 3.5 W which cannot be compared to 50 mW of the idle loss (Or in other words, we just neglect the extra 4 mA when the load current is 500 mA).