user26013: I usually encode with libx265 and libfdk_aac to get good quality and small file size for posting in Facebook. I use ffmpeg as follows.
ffmpeg -i input.mp4 -vf -c:v libx265 -c:a libfdk_aac output.mp4

If Facebook, YouTube and others video hosting sites re-encode all videos uploaded, is the codecs used still matter?
If I use h.264 codec with mp4 or MOV format as Facebook recommended, will it reduce or bypass the Facebook's video processing?
If I use h.265 for smaller file size, will the viewers of my video save their mobile data usage?

user1760: 
If Facebook, YouTube and others video hosting sites re-encode all videos uploaded, is the codecs used still matter?

Both no and yes.
Technically, no, because they can handle most common formats and re-encode what you give it no matter the format.
Practically, yes, because you have to take into account your time, energy usage, and upload speed.

If I use h.264 codec with mp4 or MOV format as Facebook recommended, will it reduce or bypass the Facebook's video processing?

No. They almost certainly re-encode everything for consistency.

If I use h.265 for smaller file size, will the viewers of my video save their mobile data usage?

If the quality between the two formats is the same, then the answer is no.

What to do
Because it appears you are re-encoding something that has already been losslessly compressed I recommend that you upload the original file and avoid the needless re-encoding step. You'll save time and avoid generation loss.
If you have to re-encode
If you must re-encode, such as if the original was encoded inefficiently, or is too big to upload, or you want to modify the video (such as by using filters), then provide "visually lossless" or as close to that as you can while still being practical to encode and upload. Avoid lossless as it will make a huge file.

26013: <p>I usually encode with <code>libx265</code> and <code>libfdk_aac</code> to get good quality and small file size for posting in Facebook. I use <code>ffmpeg</code> as follows.</p>

<pre><code>ffmpeg -i input.mp4 -vf -c:v libx265 -c:a libfdk_aac output.mp4
</code></pre>

<p>If Facebook, YouTube and others video hosting sites re-encode all videos uploaded, is the codecs used still matter?</p>

<p>If I use <code>h.264</code> codec with <code>mp4</code> or <code>MOV</code> format as Facebook recommended, will it reduce or bypass the Facebook's video processing?</p>

<p>If I use <code>h.265</code> for smaller file size, will the viewers of my video save their mobile data usage?</p>
 1760: <blockquote>
  <p>If Facebook, YouTube and others video hosting sites re-encode all videos uploaded, is the codecs used still matter?</p>
</blockquote>

<p>Both <strong>no</strong> and <strong>yes</strong>.</p>

<p>Technically, <strong>no</strong>, because they can handle most common formats and re-encode what you give it no matter the format.</p>

<p>Practically, <strong>yes</strong>, because you have to take into account your time, energy usage, and upload speed.</p>

<blockquote>
  <p>If I use h.264 codec with mp4 or MOV format as Facebook recommended, will it reduce or bypass the Facebook's video processing?</p>
</blockquote>

<p><strong>No</strong>. They almost certainly re-encode everything for consistency.</p>

<blockquote>
  <p>If I use h.265 for smaller file size, will the viewers of my video save their mobile data usage?</p>
</blockquote>

<p>If the quality between the two formats is the same, then the answer is <strong>no</strong>.</p>

<hr>

<h2>What to do</h2>

<p>Because it appears you are re-encoding something that has already been losslessly compressed I recommend that you <strong>upload the original file and avoid the needless re-encoding step</strong>. You'll save time and avoid <a href="https://en.wikipedia.org/wiki/Generation_loss" rel="nofollow noreferrer">generation loss</a>.</p>

<h3>If you have to re-encode</h3>

<p>If you must re-encode, such as if the original was encoded inefficiently, or is too big to upload, or you want to modify the video (such as by using filters), then provide "<a href="https://trac.ffmpeg.org/wiki/Encode/H.264#a1.ChooseaCRFvalue" rel="nofollow noreferrer">visually lossless</a>" or as close to that as you can while still being practical to encode and upload. Avoid lossless as it will make a huge file.</p>
