@Nemo1985:
First of all, you have to understand that you can get
any file size with
any video format. It all depends on the rate-control mode and the selected bitrate! (or target CRF value)
For example, even old-school MPEG-2 can be smaller than AVC (H.264), if you just set the target bitrate of the MPEG-2 encoder accordingly
Now, HEVC (H.265) is supposed to compress more efficiently than AVC (H.264), which means that with HEVC you
should be able to retain a similar level of quality at lower bitrate (i.e. smaller file) than with AVC.
But, again, in
no way HEVC is
guaranteed to produce a lower bitrate (i.e. smaller file) than AVC.
If you want the HEVC file to be smaller than the AVC file, you have to select a target bitrate (or target CRF value) for the HEVC encode that actually results in a lower bitrate than that of the AVC file you are comparing to!
Last but not least: HEVC (H.265) compresses more efficiently than AVC (H.264),
only if both formats are encoded from a clean original source, and
only if a "good" encoder is used for both formats!
As RanmaCanada already mentioned,
hardware encoders almost universally produce significant
worse results – at the same bitrate – than the best available
software encoders.
Therefore, if the AVC file was encoded by a "good"
software encoder, whereas the HEVC file is encoded by some
hardware encoder, then you may very well need a
higher bitrate for the HEVC file to retain similar quality!