So, what is Dragon-type's role, really?
The Legendaries and Their Role:
Rayquaza's Dragon-typing stems largely from the fact that the franchise was not ready for a pure Flying-type yet, and developers probably wanted another Dragon-type legendary. It might also stem from the fact that Asian dragons one of the few mythological species that constantly fly.
Ironically enough, Rayquaza isn't even a dragon, it is actually a viper. Mega Rayquaza is on the other hand is based off a dragon dance puppet.
Or most likely the creators just wanted to make space kaijus.
Tao trio is based off yin, yang and wuji. The draconic designs they have is probably meant to evoke Western heraldic dragons of royal families, considering their role as the signature of Unovan royalty.
Zygarde's original %50 form is based off Nidhoggr, the snake which gnaws on Yggdrasil's roots. Its cells are designed off the snakes that reside in Nidhoggr's realm, which are sometimes depicted as one eyed.
As the Ultra Beast of Gluttony, Guzzlord is a giant stomach who is also a black hole. Its Dragon-typing stems from its kaiju-like design and some depictions of dragons as gluttons.
The Trainers and Their Roles:
The Grand Flying-type Master himself, Lance initially served as a fake-out final boss, but after Red defeated Blue and went to Mt. Silver, Lance returned to his post as Champion. In Johto, he becomes a sort of mentor to Silver.
Lance's cousin, The Grand Water-type Master herself is called "The Blessed User of Dragon Pokémon". She is a prissy, jealous little runt who refuses to give your badge unless you take on her clan's challange in Dragon's Den, which is nice as it lets you get an Extreme Speed Dratini.
"The Girl Who Knows the Hearts of Dragons", Iris is the understudy of Drayden, and comes from the Village of Dragons, which in games exist in a far away region. Before Opelucid City, she appears in Castelia to protect your friendly rival Bianca. Two years later she becomes the champion because the previous player character is searching for N.
Easily the calmest of the trainers, Drasna's family from Celestic Town in Sinnoh, and their myths about the Creation Trio inspired Drasna to become a trainer herself.
Most Dragon-type legendaries are generally guardians or maintainers of stuff. Others are in this type due to type's mobility, or in Guzzlord's case, due to type's ability to gobble up stuff.
Dragon-type trainers, like Ghost's, are all over the place. They are generally people who are looking for a good challange, and people who seem to have gained a lot experience despite their age. Even the most hyper ones exhibit a sense of wisdom.
Sadly, Dragon-types like Psychic-types have been plastered around to make things look like proper gods. There isn't much Dragon-type legendaries who are about dragonness, or about the elements Dragon-type seems to represent like abundance of life or righteous fury. Sadly, neither do the trainers, because most of them are late-game bosses.