Well, the rule that allows this to work is purely syntax-based, and it doesn't know the lifetime characteristics of the functions you called. You wouldn't want String::new().len() to keep the string around until the end of the scope, but syntax-wise they are the same.
Making this kind of thing work without being syntax based is very complicated because doing the lifetime computations generally happens after the behavior of the code (including where destructors run) has been set in stone.