Because the Chinese want to expand their economic dominance on southeast Asia. Laos happens to be on their way to trade with bigger economy like Thailand, Malaysia and Singapore, they have have to build the rail through Laos, that's it. You will see Laos be invaded by the the so-called one-way-ticket Chinese "tourists" when the train runs through Laos.
I don't know who have this idea that Laos has to give China 5 km of Lao land that borders both sides of the railroad in exchange for China to build the rail through Laos. Would Myanmar, Vietnam and Cambodia accept this same stoopid condition? I don't think so. I think it's a propaganda because it's too stoopid.