Circuit architecture explains functional similarity of bacterial heat shock responses