Why we even use BJT in a circuit?

MOSFET are more efficient and usually have higher maximum current and voltage ratings than BJT. So, why we even use BJT can't we just use an MOSFET in all the places of BJT.

A BJT can be easier to use in your linear applications.

BJTs are current controlled, MOSFETs are voltage controlled, these are two different situations you run into in electronics.

Anshul333:
So, why we even use BJT can't we just use an MOSFET in all the places of BJT.

Look up 'applications' of bjt and 'applications' of mosfet (in google). Otherwise --- look up words in google such as 'bjt versus mosfet'. You can often find your answer quickly like that.

Cost is a consideration for high-volume production. If you can use a transistor that is 1 cent cheaper, you will make $10,000 more profit on a million devices.

[ Actually technically BJTs are voltage controlled, the voltage is what allows charge carriers to overcome
the emitter-base depletion zone barrier and permit current to flow. This is a deep argument about
how the internals of device work. ]

But BJTs require base current to flow, and the current in the base is strongly correlated to the current
in the load, so you can simply control the current to the base, allowing the voltage to find its own level
that matches the current. So for practical use you can indeed think of base current controlling the
device (although it really controls the voltage which then controls the device).

I turns out BJTs are usually inferior for digital applications, ie switching, and basically aren't used any more
for this.

But many analog electronics uses require the low voltage-noise performance of BJTs, and the high
input voltage accuracy/stability of bipolar opamps. And for high frequency RF amplification the
low input capacitance of BJTs often wins out over MOSFETs. That's not to say that specialized types
of FET aren't making big inroads for these applications.

For low distortion low frequency amplification the intrinsically much more linear BJT wins out over MOSFETs
(linear with local shunt feedback, that is). If you want a 0.001% audio amplifier its going to be mainly
BJTs.

Many analog circuit elements are much easier to design with BJTs, like current sources, current mirrors,
differential amplifiers, current limiting circuits, active clamps - if you are building discrete analog electronics
this is a big issue.

For microwave frequencies and above all devices are highly specialized, and the hard distinction between
BJT and FET isn't always appropriate.

For high power high voltage power conversion the IGBT is the device of choice, and this is part MOSFET
and part BJT - using the best features of both.