Dr. Roylott, like all the characters in the story, is not a real person but the creation of the author, Arthur Conan Doyle. He has Dr. Roylott make a sudden, violent appearance because he wants to spice the story with a threat of danger. Also, he has to introduce Dr. Roylott in person at some point in the story, and this seems like a convenient time for it. Roylott appears "in character." He is a bad-tempered, violent man who is used to getting his own way through intimidation. He is also exceptionally strong, as he very pointedly demonstrates.
“I will go when I have said my say. Don't you dare to meddle with my affairs. I know that Miss Stoner has been here. I traced her! I am a dangerous man to fall foul of! See here.” He stepped swiftly forward, seized the poker, and bent it into a curve with his huge brown hands.
It is obvious that his purpose is to frighten Sherlock Holmes--and perhaps he thinks he has succeeded in doing so. The ensuing investigation becomes more dramatic because the threat of Dr. Roylott's sudden reappearance and potentially murderous assault hangs over Stoke Moran like a black cloud. Holmes has asked Watson to being along his revolver. So there seems to be a possibility of a shootout between Roylott armed with one of his hunting rifles and Watson armed with his Eley's No. 2 revolver. However, Dr. Roylott is not seen again until he is dead.
Beside this table, on the wooden chair, sat Dr. Grimesby Roylott clad in a long grey dressing-gown, his bare ankles protruding beneath, and his feet thrust into red heelless Turkish slippers. Across his lap lay the short stock with the long lash which we had noticed during the day. His chin was cocked upward and his eyes were fixed in a dreadful, rigid stare at the corner of the ceiling. Round his brow he had a peculiar yellow band, with brownish speckles, which seemed to be bound tightly round his head. As we entered he made neither sound nor motion.
Dr. Roylott had wanted to kill Helen Stoner to prevent her from getting married. He could not afford to give her the one-third of his capital he would be required to part with according to the terms of his deceased wife's will. Once Helen was married she would have a husband to look after her interests. In those days women were thought to be incapable of handling money. (We know now that women are quite capable of handling money.) Roylott was alarmed when he found that Julia had gone to London to consult the famous Sherlock Holmes. He thought he could frighten the detective off--especially since Helen had no money to pay for Holmes' services. During their early-morning meeting she tells Holmes:
At present it is out of my power to reward you for your services, but in a month or six weeks I shall be married, with the control of my own income, and then at least you shall not find me ungrateful.”
But Holmes, as Watson explains in the opening paragraph of the story, is not motivated by the desire for "the acquirement of wealth."
...working as he did rather for the love of his art than for the acquirement of wealth, he refused to associate himself with any investigation which did not tend towards the unusual, and even the fantastic.