Look up black-body radiation (IIRC) for how color can affect heat radiation vs absorption.
edit: here's a page that has better explanations than I would have typed up
https://physics.stackexchange.com/questions/122911/black-and-white-matters-but-why-and-how
The bedliner will be a heat-insulating blanket around your controller, blocking some of the heat from escaping the way it did without it.
Very thin paint would be much better performing.
Anodizing would be even better than paint.
(speaking from experiences with various heat-producing objects over the years, and how I improved them or made them worse).
You can do a rigorous scientific experiment (with controls) to test these if you like.
Different "colors" / compositions of surface treatments will radiate or absorb infrared in different amounts; probably most of them will radiate or absorb heat better than polished metal would (possibly better than the burnished silver of a typical ebike controller), as it doesnt' matter what the visible light color is (it's not radiating in visible spectrum, just infrared...unless it's way past "serious malfunction"

).
So even if it was anodized white, it'd probably still shed heat better than if it was plastidipped black.