Arriving in a foreign country might require you to go through immigration and clear customs, even if you're only staying there for a brief layover. If you're flying on two separate itineraries with checked bags, you'll have to retrieve your luggage and recheck it.