The martial arts existed in many Asian countries long before the martial arts films of the 1960 and 1970s. Truth was they actually had a reasonable presence in the Western countries ever since World War two military personnel brought back the practice from Japan. Film depictions of martial arts are rarely accurate or even realistic, but they may serve to popularize the genre which then remains popular for its own merits.
The exact origin of martial arts are uncertain, and their history is complicated by traditions being mixed together and the actual practices occasionally being hidden underground. But early practice was probably necessitated by the need for self-defence and the absence of legitimate fighting weapons. At least some martial arts, perhaps all, have some military connections in their past. But modern practices tend to focus more on developing the mind, spirit and body; on physical and mental balance and self-development. This has moved from the conquering of external conflicts to the conquering of internal ones.
The appeal of many martial arts films, or of any film, is the hero overcoming adversary. This is complicated in many Asian films by an individual surrendering to a social institution or a greater cause; unlike western popular culture the individual isn’t usually celebrated over the social convention. But personal triumph is universally applauded, irrespective of whether the individual reinforces a good social force or successfully overcomes a bad one. We may identify with this in the film, even if our own struggles are much smaller. If one practices a martial art for the sake of self-improvement or the overcoming personal obstacles that is probably a perfectly valid reason.