The word "sonata" is not a name; it is a word to identify the genre, or type, of music. Most of these serious compositions have no "names", but they are identified by their publication numbers and their genre. For example, we musicians seldom call it the sonata in f, we usually call it Sonata Opus 2 Number 1. This Opus and Number designation was assigned by the original publisher, and it is now used to identity a musical work. Other composers such as Mozart and Scarlatti might use different numerical system for identification, such as Mozart sonata K. 330, or Scarlatti sonata L. 49.
RE:點解佢地唔首首都作個名俾佢
Very good question. For a serious composer writing serious instrumental music in the Classical period, the name does not really matter. What matters most is the genre or type of music (such as sonata, concerto, waltz, etc.) as the genre describes the form of the piece. Hence: title = genre = form. For example, a sonata will usually have three or four movements while a waltz will have two or three different sections within one movement. Later in the Romantic period (19th century) the title becomes more important, if only slightly. You will find more interesting titles in works of later Romantic composers such as Ravel, but during the Classical period, the form of a musical work is more important. This tendency constitutes another dissertation altogether.
RE: 我又想作咁咪撞名 ?
If you are writing a sonata in f minor, then it will be your sonata in f. The complete title will be: Andrew Fungot's Sonata Op. 1 in f minor. This is enough to identify your work.
And believe me, I will never mix it up with Beethoven's Sonata Op. 2 No. 1.