The tangent law on which the principle of working of a deflection magnetometer is based, slates, when two magnetic field F and H act as right angles, then these two fields defects through an angle $ \theta $ which is related. $ F=H\sin \theta $ Earths field is always along the directions of East West direction, therefore the magnet must always be placed with its axis along the direction of East West.