Ginny was used as bait, but likely because Tom could control her.
From what Tom says, he did use Ginny Weasley as bait to lure Harry to the Chamber. He made her write her farewell (‘her skeleton will lie in the Chamber forever’) then wait down in the Chamber for Harry. He’d been waiting for Harry to come to the Chamber since he and Ginny got there, so he clearly seems to expect that having Ginny would provide a reason for Harry to go there quickly.
“But I knew what I must do. It was clear to me that you were on the trail of Slytherin’s heir. From everything Ginny had told me about you, I knew you would go to any lengths to solve the mystery – particularly if one of your best friends was attacked. And Ginny had told me the whole school was buzzing because you could speak Parseltongue …
‘So I made Ginny write her own farewell on the wall and come down here to wait. She struggled and cried and became very boring. But there isn’t much life left in her: she put too much into the diary, into me. Enough to let me leave its pages at last. I have been waiting for you to appear since we arrived here. I knew you’d come.”
- Harry Potter and the Chamber of Secrets, Chapter 17 (The Heir of Slytherin)
He did use Ginny as bait, but that she was Harry’s best friend’s sister was probably just a fortunate coincidence for him. The reason that he used her rather than anyone else as bait to bring Harry to the Chamber was more likely because he could control her. He got her to the Chamber because he was still able to control her since she’d poured out so much of her soul to his diary. While he could use other people as bait in other ways (like killing or Petrifying all of Harry’s friends), he likely only would be able to bring someone into the Chamber alive and make them wait if he controlled them.
Hermione was most likely the best friend Tom was referring to.
Though Ginny was most likely chosen by chance but happened fortunately to be close to Harry’s friend, Hermione was probably targeted specifically and likely the best friend Tom was referring to when he said he knew from Ginny that Harry would do anything if one of his best friends was attacked. Though he wouldn’t want Ron’s sister to die, he barely knew Ginny, so she could hardly qualify as one of his best friends. Therefore, it’s much more likely he meant Hermione. The timeline matches up as well - first, Harry realized the diary is gone (meaning Ginny stole it back).
“Riddle’s diary’s gone,’ he said in an undertone to Ron.
‘What?’
Harry jerked his head towards the dormitory door and Ron followed him out. They hurried back down to the Gryffindor common room, which was half-empty, and joined Hermione, who was sitting alone, reading a book called Ancient Runes Made Easy.”
- Harry Potter and the Chamber of Secrets, Chapter 17 (Cornelius Fudge)
A day after Harry realized he didn’t have the diary anymore, Hermione is Petrified while she’s researching in the library.
“And on the bed next to her was –
‘Hermione!’ Ron groaned.
Hermione lay utterly still, her eyes open and glassy.”
- Harry Potter and the Chamber of Secrets, Chapter 17 (Cornelius Fudge)
It seems very likely that Hermione was the best friend Tom was referring to, and that Petrifying her was how he was trying to ensure Harry would be determined to solve the mystery of the Chamber. Hermione is Petrified only a day after Ginny stole the diary back so Harry wouldn’t learn her secrets, so it’s very likely Tom would have realized that Ginny had the diary again instead of Harry, and began his plan to get access to Harry again. Since he would have still been able to control Ginny, he would have been able to have her set the basilisk on Hermione.
Harry was probably just mistaken on why Ginny was used as bait.
Though Harry seems to think that Ginny was chosen as bait because she was Ron’s sister, there’s nothing that suggests he’s actually right. Hermione does refer to Ginny being used as bait, but she doesn’t seem to think it was necessarily because she’s Ron’s sister.
“I’m trying to say – Voldemort knows you, Harry! He took Ginny down into the Chamber of Secrets to lure you there, it’s the kind of thing he does, he knows you’re the – the sort of person who’d go to Sirius’s aid!”
- Harry Potter and the Order of the Phoenix, Chapter 32 (Out of the Fire)
It of course would have worked better because Ginny was Ron’s sister and therefore more significant to someone Harry cares about. However, there’s nothing suggesting she was actively singled out for this reason specifically rather than a target of opportunity other than Harry thinking it. Therefore, it seems more likely that Harry is simply mistaken about why Ginny was used as bait. Harry likely remembered that the Dark Lord (though a younger version of him) had used Ginny as bait, and was afraid it’d happen again - his reason for breaking up with her is he was concerned she’d be more of a target if they were dating. It’s likely he just thought of how she’d been used as bait, and didn’t really think properly through the reasoning behind why she was.