I think the logic here is that because the function has to return an iterator, you want to copy it before passing it to the block manager, the elements ++= computeValues is just a caching step. You don't know if it is a one time iterator and blockManager.put could consume the iterator and then only return the number of bytes written.
It's not an issue with the to-disk copy, because you let the 'put' consume the iterator and then use a 'get' to grab a new iterator that reads off the disk.