A means to transfer heat from the electronics to the cabin was simply not designed into the LM. It's worth noting that the LM had a very different approach to thermal management than the CSM.
The electronics of the command module were inside the atmosphere of its cabin. This meant that a significant amount of heat from the electronics could conduct (or even convect) into the cabin. Of course, a thermal management system was critical to keep people and equipment from overheating.
The LM ascent stage was constructed in three sections. The forward section was where the astronauts stood during landing and launch; the forward wall contained the windows and the hatch to get to the lunar surface. The mid section had the ascent engine, docking tunnel, docking hatch, and the rear wall of the cabin. The aft section contained most of the electronics and a few of the tanks; it was not part of the cabin. Because the electronics were exposed to the vacuum of space, their heat could not convect or easily conduct into the cabin.
Getting rid of excess heat from the electronics was an issue for each spacecraft. In both cases, the electronics were mounted on rails which had a glycol cooling solution circulating through them. In the CSM, the glycol circulated in a closed system to radiator panels on the exterior of the service module, where the heat was radiated away.
Radiator panels would have been too heavy for the LM, so a different approach was taken. The glycol circulated to a set of evaporator plates, where plain water evaporated to space. Although such an open system required more water than a closed system like the CSM, it still weighed less than having radiator panels, because water has an extremely high heat of sublimation.
For both spacecraft in most circumstances, activities in the cabins were expected to produce excess heat, so thermal management was designed around carrying heat away from the cabin. Nonetheless, the possibility of the cabin being too cold was considered, so both spacecraft had electric heaters for this purpose. It would have been possible to design a system to use the hot glycol to heat the cabin, but compared to electric heaters such a design would have more complexity, more weight, and less reliability.
Because Apollo 13 needed to conserve electricity, the cabin heaters were not used. Some of the electronics were still used and they produced waste heat, but without the plumbing to bring this heat into the cabin, the cabin got cold.