Why did Arya need to travel to King's Landing with her father and sister Sansa in Game of Thrones Season 1?
King's Landing is not a safe place. Wouldn't it have been safer for her to stay home in Winterfell with her mother?
When Robert asked Eddard to become the Hand of the King as well as his in-law & travel to King's Landing, Eddard had decided, along with Catelyn, to take Sansa, Arya & Brandon with him. In his absence, Robb would be the Lord of Winterfell, Jon couldn't go as he's a bastard. Rickon was too little & needed his mother, so he was to be left at Winterfell.
However, when Brandon fell from the tower & became paralyzed, he couldn't travel. And when the letter from Lysa arrived about the Lannisters having murdered the last Hand Jon Arryn, Catelyn was skeptical of letting both Arya & Sansa go to King's Landing. But in order to draw no suspicion from the Lannisters & to show that everything was fine & the Starks didn't suspect Lannister of any wrongdoing in the murder, Eddard was forced to take Sansa & Arya both as originally planned. He had a reason to leave behind Bran due to his injury but no reason to leave Arya & Sansa behind.
He also didn't want Sansa all alone with the Lannisters & wanted Arya to accompany her as they could take care of each other.
Because Ned had planned to bring most of his children, in order for them to be exposed to the wider world; they are after all children of one of the important lords of the realm. They'd also hope to teach Arya to be more lady-like.
However, The real question in why any of them stayed in Winterfell. Typically, like a job in modern world, when you take on a new job in a new city your family travels with you.
We see this with two previous Hands; Jon Arryn takes his wife Lysa and son Robert to King's Landing before Lysa fled after Jon's death, and with Tywin Lannister who brought Cersei and Jaime to court only to leave with Cersei after Jaime joined the Kingsguard.
However the Stark are different, the Starks follow the "Old Ways" and have traditions they they live by. One of these traditions is that "There must always be a Stark in Winterfell". Typically this meant the current patriarch of the house, but in the times the lord was called away someone must fill in his stead. The books offer us more detail in this interaction, and remember Ned didn't want the job is was Catelyn and Luwin who convinced him to do so.
"The Others take both of you," Ned muttered darkly. He turned away from them and went to the window. She did not speak, nor did the maester. They waited, quiet, while Eddard Stark said a silent farewell to the home he loved. When he turned away from the window at last, his voice was tired and full of melancholy, and moisture glittered faintly in the corners of his eyes. "My father went south once, to answer the summons of a king. He never came home again."
"A different time," Maester Luwin said. "A different king."
"Yes," Ned said dully. He seated himself in a chair by the hearth. "Catelyn, you shall stay here in Winterfell."
His words were like an icy draft through her heart. "No," she said, suddenly afraid. Was this to be her punishment? Never to see his face again, nor to feel his arms around her?
"Yes," Ned said, in words that would brook no argument. "You must govern the north in my stead, while I run Robert's errands. There must always be a Stark in Winterfell. Robb is fourteen. Soon enough, he will be a man grown. He must learn to rule, and I will not be here for him. Make him part of your councils. He must be ready when his time comes."
"Gods will, not for many years," Maester Luwin murmured.
"Maester Luwin, I trust you as I would my own blood. Give my wife your voice in all things great and small. Teach my son the things he needs to know. Winter is coming."
Maester Luwin nodded gravely. Then silence fell, until Catelyn found her courage and asked the question whose answer she most dreaded. "What of the other children?"
Ned stood, and took her in his arms, and held her face close to his. "Rickon is very young," he said gently. "He should stay here with you and Robb. The others I would take with me."
"I could not bear it," Catelyn said, trembling.
"You must," he said. "Sansa must wed Joffrey, that is clear now, we must give them no grounds to suspect our devotion. And it is past time that Arya learned the ways of a southron court. In a few years she will be of an age to marry too."
Sansa would shine in the south, Catelyn thought to herself, and the gods knew that Arya needed refinement. Reluctantly, she let go of them in her heart. But not Bran. Never Bran. "Yes," she said, "but please, Ned, for the love you bear me, let Bran remain here at Winterfell. He is only seven."
"I was eight when my father sent me to foster at the Eyrie," Ned said. "Ser Rodrik tells me there is bad feeling between Robb and Prince Joffrey. That is not healthy. Bran can bridge that distance. He is a sweet boy, quick to laugh, easy to love. Let him grow up with the young princes, let him become their friend as Robert became mine. Our House will be the safer for it."
A Game of Thrones - Catelyn II