First of all, Sid worked for Cpt. Dudley Smith and this setup was actually done for him, in order to give his dark schemes some backing from DA Loew. The dialogue during Bud's and Exley's "interrogation" of the DA makes this clear, and it also gives the reason why Matt ultimately had to die:
Loew: Dudley Smith is a highly decorated officer of this city's police department. I won't smear his and Pierce Patchett's name without...
Exley: Without what, them smearing yours first? What do they have on you, Loew? Pictures of you and an out of work actor with your pants down?
...
Loew: Okay! Okay! Pierce Patchett and Dudley! I wouldn't play ball so they hatched this blackmail scheme to destroy me. I capitulated. The kid heard everything so they killed him.
So Matt had to die because he overheard the argument between the DA and Dudley/Patchett and from then on knew too much (similar to the third theory from the question). Who it was then? Most probably one of Dudley's henchmen, or maybe even Dudley himself, given that he doesn't seem to have any problems with making his own hands dirty.