CMMI is a more general set of software engineering rules, of which agile methods would be considered a subset, and scrum is a specific popular implementation of that subset, and this is reflected in the templates as well.
CMMI is a newer, updated model of CMM. SEI developed CMMI to integrate and standardize CMM, which has different models for each function it covers. These models were not always in sync; integrating them made the process more efficient and flexible. CMMI adds Agile principles to CMM to help improve development processes, software configuration management and software quality management.