output impedance of bjt
According to the second image(equivalent to the first image), the
output impedance is nothing but an ac voltage source whose terminals
are connected by Rc

Your 2nd circuit is somewhat correct but you misinterpret the transistor as a voltage source when it is in fact a current source. A current source has (theoretically) infinite impedance and, when placed in parallel with Rc, creates no change to the effective impedance of the output: -

The output impedance is still mainly defined by Rc. I say &quot;mainly defined&quot; because, if you look within the BJT itself it has a non zero output admittance (\$h_{oe}\$) in the diagram below: -

Hybrid Parameter model diagram taken from this pdf document.