What is a hidden city ticket, and why is it risky?
Booking a flight to a destination beyond where you actually want to go, and getting off at the connection — exploiting the fact that a connecting itinerary is sometimes cheaper than the direct flight to the intermediate city.
Why the pricing anomaly exists. Fares are set by market, not by distance. A route where the airline faces strong competition is priced aggressively; a route where it is dominant is not. A connecting itinerary passing through a hub can therefore undercut the direct flight to that hub, because the two are priced against different competitive situations.
Why it is risky, and the risks are substantial:
You cannot check luggage. A checked bag is tagged to the final destination and will travel there without you. Everything must be carry-on, which alone rules it out for many trips.
The remainder of the itinerary is cancelled. Airlines cancel all subsequent segments when a passenger fails to board one — so it never works on a return ticket, and the return journey is lost entirely.
The airline may reroute you. Airlines change schedules and rebook passengers routinely, and there is no obligation to preserve the connection you were relying on. You can be placed on a direct flight to the final destination, skipping the city you actually wanted.
It breaches the conditions of carriage. Airlines prohibit it explicitly, and enforcement has included cancelling frequent flyer accounts and confiscating miles, refusing future carriage, and in some documented cases pursuing passengers or travel agencies. Lawsuits against sites promoting the practice have had mixed outcomes across jurisdictions.
No protection when things go wrong. Missing a connection or a disrupted schedule leaves you with no recourse, because you were not travelling as ticketed.
Visa and immigration complications, since your stated itinerary does not match your actual travel.
Related practices airlines also prohibit: throwaway ticketing, buying a return and discarding the return leg because it is cheaper than a one-way; and back-to-back ticketing, overlapping two returns to defeat minimum-stay requirements.
The honest assessment: it occasionally saves money, and the failure modes are severe and entirely at your own risk.