Therein means contained in the place that has been mentioned. By burning tree branches, pine needles, and pine cones, many not only warm their houses but improve the smell therein
When you say therein lies a situation or problem, you mean that an existing situation has caused that situation or problem. Santa Maria di Castellabate is barely mentioned in guidebooks; therein lies its charm