There's indication in some sources that the RB had nuclear capability, though there's nothing really proven about this claim. Assuming it was nuclear-capable, that would justify the addition of bombing equipment, though yes, as a conventional bomber it would have been of dubious value.
Overall, I'd tend to agree that sticking with straight recon MiG-25Rs would've been a better idea - all else being equal being so much faster than the MiG-23 is a major advantage - but it's entirely possible a pure recon aircraft was too specialized for the Soviets' blood and bomb-dropping was added on to make it more politically palatable.
The BM, on the other hand, was not related to the MiG-25R line, and in fact was very much a dedicated, separate variant. Though my sources don't say why the MiG-25 specifically was utilized for the job over the MiG-23, I strongly suspect it was a size issue. The Soviet preference for standoff SEAD, rather than the up close and personal tactics of American Wild Weasels, required an extremely large, powerful, and sophisticated RHAWS system that probably wouldn't have fit in a smaller aircraft like the MiG-23. Not to mention the four Kh-58 missiles. Hell, even American SEAD tactics were largely conducted with large planes. The Thunderchief and Phantom aren't as big as the MiG-25, but they're not small aircraft and are a good deal bigger than the MiG-23.
As for ECM aircraft, the Soviets seemed to have been mostly content with the Yak-28PP - not the worst idea, given the long careers of the EKA-3 and EA-6B - and no ECM variant of the MiG-25 was even proposed.