In a neutral playthtough, likely a first-run where a player is likely to have killed a few monsters, Flowey makes some calls on what kind of "true end" you're going for and gives you pointers to achieve that end. (this is an assumption based on my own experience.) It's safe to say he's playing around with you, letting you be challenged, in turn giving him something to look forward to. He's been there for a long time, and you're the most interesting thing to happen in a long time.
In a pacifist playthrough, he doesn't want you to win, because not only will everyone else leave, but there won't be much else for you, the player to do either. You'll leave and maybe never come back. This is a very meta motivation for a villain, but anyone who's both killed and spared Toriel knows that's part of what he is.
In a no mercy play, though, he has second thoughts about assisting you, because you are ending all encounters with death. You are done with the game when everyone else is done being an obstacle. This is where Chara calls you out on the desire for GAINS *flex* like most other RPGS work to let you crush foes. In this scenario, there is little anyone, let alone Flowey/Asriel, can do to keep you invested in the game, since by the time you see him again you've already bested the "secret" boss, Sans.
tl;dr, Asriel is the manifestation of the game wanting you to keep playing the game. I would have said he's the game creator's self-insertion, but I think he's already confirmed that he's the dog that shows up randomly to fuck with you and the other characters.
Had a dream where i was a low rank member of a team equipped to fight off a mysterious invasion of radioactive beings from who-knows. I somehow developed the ability to see the radiation they emitted (like a heat map) and the encounters were.like a tactical rpg (with a game over and retry). I lead the team to a fortress giving off loads of the radiation, but when we get inside, the radiation disappears from my vision. We go outside to find our exit path is in flames, and the other members of our team are irradiated and trying to stop us. The dream ends as I am trying to learn what the invaders' true motivations are by talking to the "infected."