I apologize if I am not very eloquent with this response, but I'll try my best.
Consider the case of Beauty and the Beast for a moment. In this film, the antagonist is generally considered to be Gaston. Mostly because he is arrogant, selfish, and wants really badly to be considered the hero everyone wants and needs. So much so, that this desire blinds him to basic common sense and he ends up being taken out by his own hubris. However, from his point of view, he is the hero, trying to save his love interest from the scary monster. Honestly, in his eyes he seems like a real stand up guy and he isn't really seeing the negatives of what he is doing.
I think Riku is operating on a slightly similar principle as Gaston, and as such it is fairly believable to me. I don't think it comes from a place of "just because". He has very clear reasons for what he does, I think, and that is what motivates him to do more and more questionably "evil" stuff. But in his mind, he has justified it all away until he is so far gone he can't salvage it.
Starting from when he is young, we know that his ultimate desire is to be strong enough to protect his friends. He became pretty used to being the guy everyone turned to for help, and maybe almost needed to fill that role to feel satisfied with himself. It was also clear that he was intensely dissatisfied with being stuck on a tiny little island with nothing much to do except play around. He wanted to be strong, and probably wanted to DO things with that strength. He wanted to go on adventures and be the hero. In many video games, this sort of character is definitely going to be the main protagonist, simply because that is such a common and relatable trait to have.
Sora, on the other hand, while he did want to go explore other worlds (as he says at the start of the game) doesn't care so much about the adventure but rather who he is sharing it with. No matter where Riku wanted to go, he was happy to follow along because they would be together. Riku was the one who suggested the raft project, Riku was the one putting the most work into it, because Riku was the one who wanted to go the most. Meanwhile, Sora was happily helping out, getting excited himself because it maybe sounded fun, and it would let him spend time with his best friend.
So, again, in most games Riku would probably be the protagonist, spear-heading the adventure and the direction the party moves in, while Sora is the plucky best friend who tags along. But that, obviously, isn't what happened. Riku, maybe like Gaston, got too focused on what he wanted, his desire to be strong and get out of his tiny little backwater island that he made some incredibly stupid decisions. Naively believed what some creeper in a coat told him, and messed his home up. I don't think him initially aiding in bringing the darkness to the island was forced, because it fits what I understood about his character. So utterly desperate to reach his goal he was willing to sacrifice anything. He, also naively, maybe assumed even if something bad was to happen, he was such a strong guy that Sora and Kairi would both be okay. He would help them out. He's the hero.
I mean, you can even see this dynamic represented in the little chalk drawings they made as kids. There is one of the three of them fighting some goop monster, and Sora is standing back, guarding Kairi while Riku is launching himself sword-first at the thing's head. So, this is why the "jealousy" that they refer to makes a lot of sense. Because Sora ended up getting the Keyblade, not him. When you first run into Riku in Traverse Town after meeting Merlin, he seems perfectly normal riiiight until Sora whips the Keyblade out to smash a Heartless in the face, thinking it's pretty snazzy. Riku just absolutely hates that their usual dynamic is, well, not what it usually is. As he was saying when he got cut off, "just leave it to me". He liked being the strong one everyone could count on, and in his mind, Sora was maybe trying to vie for that spot. It also didn't sit right with him that Sora was "chosen" by the Keyblade. In Riku's mind, that should be his job, as the hero.
And later from what he learned from Maleficent, it really was supposed to be his. So the whole time Sora was using his Keyblade and that just really didn't sit right with him. This is where his jealousy started to influence most if not all of his decisions. He wanted to be the best, and be strong, etc... And his extreme focus on this, like tunnel vision, meant that he was almost actively working against his own better interests.
I slightly disagree that his motivations were entirely fueled by wanting to be the only person important to Sora, because he was throwing a TON of effort in trying to get Kairi's heart back. In fact, this is the sole reason he keeps being antagonistic initially is because he is trying to do whatever he can to help her. He doesn't have a Keyblade, he is angry at Sora for trying to steal his thunder, and for stealing what was supposed to be his. He wants to save her so badly, to maybe prove that he is a strong person, that he is willing to step on anyone and anything in his way. He teams up with Maleficent, not because he likes her or really trusts her all that much, but because he is using her for his own goals.
Take the stuff that happens in Neverland for example. He shows off Kairi to Sora, basically saying "see! I am helping her and you aren't. I AM THE HERO, NOT YOU." Then chucks Sora in the jail room. He also makes a point to tell the captain not to let Sora and Kairi see each other. I think this is, again, born out of jealousy, maybe insecurity, because he wants to be the one to help Kairi. He doesn't want Sora interfering with it because, to Riku, that would mean he failed at being the strongest. At this point in time, he has a goal to be "strong" still, and for a while Sora has been actively interfering with what he thinks he needs to do to be strong in his own mind, so he basically declares Sora an enemy at this point. Their "rivalry" is pretty much built up all inside Riku's head.
Anyway, long rambling piece coming to an end here:
I think him being an antagonist is wonderful because he is strong, great, motivated, etc. and represents someone who, in order to achieve their goals in life stops listening to their heart and selfishly presses on at any cost. Then you have someone like Sora who was supposed to be average, not particularly special, not considered all that great, but he listens to his heart gosh darn it and his friends help him out so they can see things through together. Having Riku around allows these two ways of life to come into conflict with each other, and with Sora's victory obviously highlight a major theme of the game. That it doesn't matter how strong you want to be, or think you are, if you lose sight of yourself and selfishly throw away those around you, you really aren't going to get very far.
It is also a great way to show Sora's growth as a character, in how much confidence he is able to gain about his own ability to stand up for himself. This is why they made him an antagonist, I think. Because through his character, we see what makes Sora special. And Riku has very clear reasons for doing what he does.
If Riku was not an antagonist, I think it would be far more difficult for players to feel as connected with Sora on his journey. Because when you first step into this world with him you are supposed to feel slightly overwhelmed, maybe under powered, and eventually work your way up to the top. Defeating Riku is almost like the in-game acknowledgement that you did it. It allows a player to have something to conquer and feel like their adventure and hard work has paid off in defeating someone who was previously a strong competitor all the way back from the start of the game.
Final thoughts/ tl;dr: Riku being an antagonist makes sense from many levels. One, from just the pure mechanics of the game, in allowing a player to feel accomplished at defeating a character that may have posed a challenge at the start of the game. Two, from serving as a way to highlight one of the themes of the game by clashing two opposing viewpoints at each other and demonstrating which the game considers superior. Three, using the contrast between the two of them as a vehicle for Sora's own characterization and making him relatable to the audience. And four, it honestly just makes sense for both the characters to end up in that position based on their personalities, so it just...works.