Sonata basically means that it's an instrumental piece. Sonatas where one of the reasons that instrumental music began to get attention, in contrast with Vocal music. When it first was first used it was to merely define a instrumental piece of several movements, generally slow-fast-slow-fast. There were several common practices, but the term "sonata form" didn't exist until the 19th century, after Beethoven, along with the terms of Expo-Development-Recap. It was latter "standarized" and taught as that, but then like j_menz said
The term was never strictly defined and has over time lost any semblance of meaning in terms of formal structure.
. But if you're writing one as a learning experience, then a good start is to use that "usual" structure.
Just keep in mind that theory comes from practice, not the other way around, the definitions of "sonata" came after the term "sonata" was being used to name composition, and the term "sonata form" was invented even centuries later.