Yes, some airlines offer free stopover programs that let you break a connecting trip in their hub city for several days without paying extra airfare.
Icelandair is the best-known example. On a transatlantic trip, travelers connect at Keflavík airport and can turn that connection into a Stopover in Iceland at no additional airfare. Most Icelandair fares allow up to 7 nights, and Economy Flex or Saga Premium Flex fares allow up to 21 nights, although stays over 7 nights must be booked through the service center. The program covers flights only, so hotels are booked separately. The total trip price can still change, because the second flight leg moves to a different date with different demand, and adding a stopover to an existing booking can trigger a change fee. TAP Air Portugal runs a similar free stopover of up to 10 days in Lisbon or Porto.
Source: Icelandair, Stopover in Iceland
Image: Icelandair TF-ICS at Keflavík International Airport, APK, CC BY 4.0, via Wikimedia Commons.