Please read the end part of the narration which says Mutta'a is permissible according to some scholars. The Bukhari with Urdu translation by Wahid ul Zaman, they wrote those are some Hanafi ascholars who say that Muta'h is permissible.
URDU TRANSLATION: