Values only live as long as something holds onto them. If nothing holds onto a value (i.e. when it is not bound to a variable or a pattern), it is dropped. Therefore, in the first snippet, the intermediate Vec is dropped at the end of that line. However, split_first() returns references inside the slice it is invoked on, hence you would get a dangling pointer immediately, with no backing allocation.
In the second snippet, however, you hold onto the vector to be split using the t variable, so it lives as long as the scope of t ends.
Note that in Rust, holding a reference to a value does not extend its lifetime. If you are coming from C++, you might expect there to be a special case like lifetime extension of rvalues bound to const references. This is not how it works in Rust at all – you have to make sure your references point to valid memory, otherwise the compiler will complain.