How did the temperature gradient build up?
Let us ask what happens when you attach one end of the uniform bar to the hot reservoir and the other end to the cold reservoir. For simplicity, consider that the bar is initially at the temperature of the cold reservoir, and that no heat can be lost through the surface of the bar.
Imagine cutting the bar up into infinitesimally thin “slices/slabs”.
Because there is a large temperature gradient at the junction with the hot reservoir, heat flows into the “first slice of the bar”. But further into the bar, the temperature gradient is smaller, so less heat flows out of this “first slab”. Thus the temperature of this slab rises. You can see that the temperature profile is non-linear, steeply rising at the hot junction to approach the temperature of the hot reservoir.
With time, the bar gets heated more and more away from the hot junction. The temperature profile continues to evolve with time, governed by the two equations: heat conduction equation and heat capacity equation.
Eventually the temperature profile becomes unchanging with time. We call this the steady state. For the uniform bar here, this steady-state temperature profile is linear.
Note: At any chosen “slice”, the amount of heat coming in will be equal to the amount of heat going out of the slab. The “slices” are in equilibrium.