Back in 2004, Massachusetts changed the law to allow for a special election to fill a vacant senate seat. This was to prevent then Governor Romney(R) the abilility to appoint an interim Senator on the chance that John Kerry would win the presidency. Now they have changed the law again to fit their political agenda.
Quoting from the article on Kerry's website:
President Obama, whose senior aides helped orchestrate the state law change that allowed Patrick to make the interim appointment, praised Kirk as a "distinguished leader, whose long collaboration with Senator Kennedy makes him an excellent, interim choice to carry on his work until the voters make their choice in January."
Check out this Wall Street Journal article from August of 2009