Part of what makes Nyehctar, the friendship between Flowey and Papyrus, work is that despite how opposite they can be, they still share a lot more in common than people realize, especially if you compare Asriel to Papyrus. Flowey can plausibly see remnants of his old self in Papyrus, and so in some way, Papyrus is the tether to his past. One part of how this is shown is when you think about it, the both of them have an inner child stuck in an adult body ("adult" in quotes for Flowey's case).
Even though Flowey doesn't say it directly, I feel like he is intensely upset over never being able to grow up properly. He died in childhood, and he couldn't even really die. He's stuck in this ageless body forever. It's why he tries to act like an adult by killing everyone, assuming he knows everything, referring to his hyperdeath god form being as his "adult form", even claiming that he grew up during the 5th anniversary letters, and yet his view of what it means to be adult, or more accurately "mature", is so warped. He thinks that his philosophy of kill or be killed means he has grown up to see the real world when that couldn't be further from the truth.
Meanwhile, Papyrus has never said a word about how everyone treats her like a child, but she mourns over not being able to befriend monsters as easily as everyone else does. Her perceived childishness is part of why monsters view her as weird and stay away from her in favor of her "more mature" brother. Her "innocence" is why Undyne won't let her join the Royal Guard. I would be deeply frustrated if I were her! Not even we, the audience, spared her from the infantilization that plagued her entire existence. Just because she held onto her optimism and saw the good in everyone, and she has interests and beliefs that are associated with younger folks, that doesn't mean she hasn't grown up, and yet people act like otherwise.
Flowey and Papyrus both share similar pains, and this is one of them. The pain of losing their right to be an adult because of outside circumstances. I think Flowey realizes Papyrus understands him more than any other monster, and that's why he stays with her. Why Papyrus is the one that Flowey took longer to "get bored of".












