Because it's not just a matter of screen size, it is also a matter of screen density. I'll explain. The convertation formula from px to dp units is as follows:
dp = px * 160 / dpi, where dpi is your screen density.
Consequently, from the values you calculated (let's take the width) we have the following values for the screen density:
Galaxy Note 3 (width = 1080 px): dpi = 1080 * 160 / 360 = 480
Moto X (width = 720 px): dpi = 720 * 160 / 360 = 320.
Galaxy Note 3 and Moto X have the same width = 360 dp because of equal width/dpi ratio = 2.25 (same for the height/dpi ratio = 4). Now imagine Moto X has the same density as Galaxy Note 3. In that case you'd get a smaller width = 240 dp for Moto X.