Adding on to Rick's resampling rhetoric...
The reason the MNI template is only partially displayed, is that the "random" dataset used as the master here is not in the same space as the MNI dataset. The grid doesn't transform or align the data in any way, and the original xyz positions are simply interpolated onto that random dataset's grid. The template_resam+orig and the test+orig output are marked as being in the +orig view and orig space
3dcalc -a jRandomDataset:104,128,128 -expr a -prefix template_resam
3dresample -master template_resam+orig. -inset MNI152_2009_template_SSW.nii.gz -prefix test
Resampling the template dataset to a specific grid can be done in the ways Rick suggested.