Sometimes Firefox uses HTTPS and sometimes not.
Why does that happen, is that caused by Firefox or by websites that I visit?
The answer is that HTTPS is for Secure interaction between client (the browser) and server (site) but it requires additional computer (client and server's) resources to work. Therefore, sites don't use HTTPS everywhere.
ALso, since HTTPS uses, so called, Certificates which are not free to use (they could create their own Certificates though for free, but browsers would complain that it's issued by Untrusted source). Sites use HTTPS only in critical pages like Login pages, shops etc.
In your case it is actually not the browser issue it is rather site configurations.
However, possibly, FireFox detects two versions of sites (http and https) and prefers HTTPS over HTTP.
HTTPS is used for secure connection between server and client and data on this connection is sent encrypted so eavesdropping is not possible. HTTPS require Certificates and trusted certificates are expensive (not much though). So not every site has this. It is generally used while sensitive data is to be sent over network, say credit card details, or login information etc. So for those hosts, which has HTTPS connections available, HTTPS connection is used.