Who created the definition of grammar error? Why is the person that created grammar error made as our reference of grammar and why do we use his/her saying?
This is a deeper and more difficult question than it seems on the surface --it's also one with less consensus than you might expect.
The study of the structure of language, as opposed to the meaning, is called syntax, of which grammar is a part. Typically, the rules of grammar are considered consensus objects of the community of speakers, rather than as natural types (in other words, this is good grammar because we all agree it is good grammar, not because we discovered this rule engraved on a tablet of gold somewhere). However, there are theorists who believe there are underlying rules to grammar that have their own independent reality similar to that the rules of mathematics (putatively) possess. Conversely, others prefer to describe grammar as an emergent phenomenon.
Even if one does accept grammar rules as just a consensus-based functional artifact of language, there are still a range of philosophical issues relating to the social matrix of the language. For example, grammar is quite typically a marker of social status, with different grammars dominating the dialects of the upper and lower socioeconomic classes. Is it correct to privilege the upper-class grammar as correct? These and many other questions are unresolved within the field.
Grammar is merely a social consensus on how to express oneself in order to be easily understood by others and to understand them.
It is not to be represented as stemming from "natural law" or representing any political orthodoxy, or else a program(-me) to devaluate or impair other languages.
There are, of course, many examples of abuses in recent times particularly with the reinvention of national identities in the nineteenth century -- when nationalist policies in education were aimed both against foreign (typically imperial languages) and other languages and dialects within the nation-state (deemed "inferior"). There was, in some cases, an element of "social darwinism".
It is very possible that the mystique of grammar and fear of making mistakes is traceable to educational methods that were punishing children for using dialectal expressions or inflections, instead of the standard "national" canon. It is obvious that this fear was not conducive to better speaking or writing in the long term, but to frustration, revolt and eventually deliberate avoidance of grammar. It has led as well to the transformation of "minority languages" into political weapons to claim autonomy or independence (and, in some cases, to restart the whole cycle of linguistic oppression).
On the other hand, let us guard ourself against a fallacy: abusus non tollit usum. There are very functional reasons why a consensus has to emerge somehow about grammar and be relatively stable in time: if anything, so that we can understand each other unambiguously in daily conversation and correspondence, and so that we can understand the regulations of our society, and possibly decypher texts written one or two centuries ago.
There's a difference here between a "grammar error" and something being "ungrammatical." A grammar error is a violation of prescriptive rules of a language, and is more a subtle measure of education than a barrier to understanding. An "ungrammatical" sentence cannot possibly be uttered by someone speaking the language competently.
For an example, "Me and my mother went to the store" is a valid English sentence understood by anyone who competently speaks the language, but prescriptively the use of "me" is incorrect because if you remove "and my mother" it becomes *Me went to the store, which is ungrammatical. This prescriptive rule that you should be able to remove part of the subject and retain grammaticality does not seem to genuinely be part of the language, but it is for the most part adhered to by educated speakers because it is taught in schools.