Q:

For a motion to be simple harmonic motion, must it be periodic?

Is it necessary for a motion to execute simple harmonic motion to be periodic? Can't simple harmonic be non-periodic?

A:

Simple harmonic motion is necessarily periodic since its is described by the function
$$
x(t)=A\cos(\omega t+\varphi)\, .
$$
The converse is not true: periodic motion is not necessarily simple harmonic motion.  There are multiple examples of this.
Planetary motion is periodic but not a simple harmonic motion: it is 2D and takes place on an ellipse. For instance:
\begin{align}
x(t)=A\cos(\omega t)\, ,\qquad y(t)=A\cos(\omega’ t)
\end{align}
will be periodic in $x$ but not necessarily form on a closed orbit unless $\omega$ and $\omega’$ are commensurate.
A combination of simple harmonic motions is also periodic if the two motions have commensurate frequencies, but the sum is not a simple harmonic motion.  For instance,
$$
x(t)=A\cos(\omega t)+ B \cos(2\omega t)
$$
will be periodic but not simply harmonic.  More generally, any signal decomposed using Fourier analysis will be periodic with the period given in terms of the fundamental frequency (v.g. musical notes) but not simply harmonic.

A:

Is it necessary for a motion to execute simple harmonic motion to be periodic?

Simple harmonic motion is motion that can be written as a sinusoidal function. Sinusoidal functions are periodic. So yes it is necessary

