At lower levels of A Spec the AI cars are very slow in the corners but very fast on the straight.
The advantage you have on A spec is tyres and and therefore grip and subsequently corner speed.
BHP does not determine how fast you go round corners nor does it change bewteen corner and straights, grip, balance and handling does have an affect on corner speed.
You can have better tyres than the AI cars, so you corner faster, but when it comes to the straights they are faster than you in a similiar car i.e. a drag race, especially on a long straight like Fuji, in a slow car, like the Yaris.
It evens out the further you get in the game, it becomes alot easier.
For instance, A Spec GT All stars series, I was able to beat superier Le Mans cars with a japenese GT car, despite a huge power to weight disadvantage, because I had soft racing tyres on, they didn't.
However, it did take a bit of practice, setting car up for each individual race and consistent, fast driving with few mistakes.
Don't read to much into the speed of the AI, look at what cars you are racing in ''typical opponents'', look at previous and current threads in this forum for advice on what cars to use for what levels, what cars to buy and what cars to avoid.
Don't get too hung up on what the AI is and isn't doing, what they should and shouldn't be doing, it'll drive you mad. There are alot of faults with this game, but use this forum, learn from other people's experiences and mistakes and try and enjoy the game, there are some very good bits to it.