The 10th is the gerrymander remnant of the pre-redistricting 4th District, which was previously the 19th District until PA lost one seat after the previous census.
The 19th historically was all of York and Adams Counties where the GOP holds a 2:1 registration lead. Little by litte more and more parts of Cumberland County were added in attempts to turn the district blue. When the City of Harrisburg was added the RAT power grab became obvious.
Now the 10th has two deep blue cites (Harrisburg and York) mitigated by some deep red areas (Adams County and northern York County).
Harrisburg may be the PA capital, but with only 50,000 residents its actually smaller than some of Philadelphias suburban towns. The city is surrounded by a lot of suburban and rural areas that are hardly left-leaning.