Your narrow focus on the letter of the "hostile" law simply converts the ridiculousness into a different form. If "hostile" is significant from a crunch perspective, and single-target spells can only be cast on hostile targets, then Warcaster becomes an infallible spy-detector. Just have everybody try to run past you and cast Ray of Frost on them as they go by. Only the "hostile" creatures will actually be targeted by a spell and all the friendlies will have nothing happen to them.
That's still as ridiculous as Haste, it's just a different kind of ridiculous. The root cause of the ridiculousness is that the feat is modifying the tempo at which spells are cast.
From a game balance perspective, Warcaster is fine, but from a game physics perspective it's incoherent and would be better off rewritten.
No, the game doesn't work like a finite state machine. "Hostile" is not a message that appears in flashing neon above the target and it is not denoted by the colour of the circle at their feet. This is a table top RPG, not a computer game, and the key point here is that there is a human DM running the game.
I'm not focussing on the letter of any of these rules. I'm focussing on what makes sense from an in-game perspective - and that means that someone is hostile because my character sees them as a threat. All you are presenting as arguments about this feat being "bad" are "Well, if you metagame it like
this and go against the intent and letter of the rules like
so, you get a ridiculous result". Yes, you do. Of course you do.
If I decide that "Once per turn" means my rogue can sneak attack on every hit, then I am going to get a ridiculous result according to the rules of the game. If I decide that concentration on some spells doesn't count... ridiculous result. You are focussing on rules lawyering your way to interpretations of the rules that simply don't make sense from the perspective of the written rules or their intent.
As I said, if you and your group enjoy that, more power to you. The game is what you make of it. But you shouldn't blame the game when you get a ridiculous result, if this is what you're doing.
A hostile creature is one your character believes to be hostile. Could one of your party pretend to be hostile? Yes, of course. They could do so by, oh, maybe being hostile? Attacking your PC? That would do it. Could you fool yourself into believing that an ally is hostile? Sure. But if you then abused this rule to cast a spell on them, if I were the DM I would insist that you used something damaging to them.. after all, if you can tell they're not hostile enough to cast Haste on them, then you know they aren't hostile and your training doesn't kick in.
You want to cast Haste on an ally outside of your turn? Ready an action to do it.