Why do people prefer cosine to sine when speaking of harmonic oscillation? In almost all of the physics textbooks I have ever read, the author will write the oscillating function as

$$x(t)=\cos\left(\omega t+\phi\right)$$

My question is that,  is there any practical or historical  reason why we should prefer $\cos$ to $\sin$ here? One possible explanation I can think of is that, to trigger a harmonic oscillation movement, we usually push the mass (to the maximum displacement) from the balance point at the initial moment, for which the cosine function will be neater to use than sine ($\phi=0$). But is it really the case?
 A: I agree with you that one good reason for using $\cos$ is that it corresponds well with the initial conditions for harmonic motion.
Another good reason is experimental observation. If I come across a physical system that is oscillating, I will want to measure its amplitude and period. Examples include a swinging pendulum, a planet observed rotating around it star, a pulsing wave etc.
Observing the phenomena from a distance, it is possible to note the extreme positions of the motion and determine the amplitude as half the distance between those positions.
To find the period, I want to start my stopwatch at a particular point in the motion and stop it again when that point is repeated, I can choose to do so when the motion is at one extreme or to do so at the moment when the object passes through a particular point. If I try to press the button as the object passes through its central point, I am doing so when it is at its maximum velocity and this can be difficult to observe accurately. It is therefore easier to start timing at one of the extreme values, which corresponds to a $\cos$ function.
A: Direct current (I = const, U = const, etc.) can be assumed as "alternating current with ω = 0 and ϕ = 0" only when using cosine, but not sine. This reason went from the electrical engineering.
A: Another reason is to use the initial position as a parameter.
Compare $z=z_0\lambda^t$  and $h=h_0\cos \omega t$
You can't do the same with $\sin$ - at best you can say perhaps $d=d_{max}\sin \omega t$
By the way, this argument fails once you introduce a phase shift!
