This calculation assumes that the duct back is sufficiently long such that assuming it is 'infinite' is reasonable. An infinitely long duct bank only has radial heat transfer. There are no ends, so no heat dissipates out the ends of duct bank. When a duct bank ends in free air, the last bit of the duct bank will run a bit cooler. When the duct bank ends in a vertical 90 degree bend, the corner of duct bank may be a bit hotter.
An example of a very short duct bank is a cable passing from one side of a building firewall to the other side. In this case, the insulated firewall penetration prevents most of the radial heat transfer. Instead, most of the heat travels axially through the conductor past the face of the wall and then the heat dissipates into the room. Typically ampacity analysis switches from assuming 'infinitely' short duct banks to 'infinitely' long duct banks at around 2 feet length.