In a closed loop system, when obtaining a bode plot why is the open loop transfer function used?
Let me try to give you a short insight of why that is done. \$G(s)H(s)\$ is called the loop gain. You don't need to find the whole system transfer function (i.e closed loop) to have a 'feel' for what the stability looks like.

Now, with the loop gain you can analyze the relative stability of the system. Think about it, when the magintude of \$G(s)H(s)\$ is -1, the denominator in the closed loop transfer function becomes zero and the transfer function gives you and unbounded result.

So by plotting the bode plot of \$G(s)H(s)\$, you can see how close to instability the system is (how close you are to 1 or 0dB when the phase is -180 degrees or how close to -180 when the gain is 0 dB; this means -1 in the denominator). Those two tests done with the loop gain are the phase and gain margin tests.