Sony has been in the smartphone market longer than Samsung. The Japanese brand is also a pioneer in water and dust proofing its devices. Now, both the Xperia Z2 and the Galaxy S5 are equally matched as both offer the same perks.
Speed-wise, both the Z1 and Galaxy S5 runs on the same Snapdragon 801 processor but the latter has a much faster clocking speed than the former. On the other hand, the Z2 has 1GB extra RAM than the 2GB on the S5 making it more efficient.
The cameras on the Z2 are also much more powerful as it is equipped with a 20.7MP rear camera compared to the 16MP on the S5. However, the S5 has that something more which is a fingerprint sensor.
There is no telling the better device. It is up to the consumers to decide what is best for them. Would you prefer the Sony Xperia Z2 or the Samsung Galaxy S5?