Because inside apostrophes ("single quotes") it is *defined* not to do any expansions, while inside quotes expansions are performed... check your manual carefully.