1. Ferrari has intentionally limited production to 7000 cars per year in order to make their brand more exclusive. Toyota makes over 10 million per year. [edit: they are making a little more than 8000 this year.]
2. The average Toyota costs $33,000 while the average Ferrari sells for $315,000 (not factoring in their super-cars (like the Pininfarina Sergio) which go for $3 million.
3. Ferrari makes a range of specialty cars all designed for people who enjoy driving and are willing to put comfort and utility as low priorities. Toyota focuses on building a variety of functional vehicles including cars, vans, and trucks.
4. The average Toyota owner owns 1 to 2 cars. The average Ferrari owner has 5 or more cars. (65% of Ferrari owners have more than one Ferrari.)
5. Ferrari is owned 23% by Exor (who owns Fiat Chrysler) while Toyota is the parent company of itself. This means there is more pressure on Toyota to sell more cars at the expense of quality, while Ferrari's investors encourage low volume high value sales to avoid competing with its other brands.
Ferrari and Toyota make different products targeted at different consumers and run their organizations with very different business plans. Ferrari makes an estimated $80,000 per car while Toyota averages less than $3000 per car. Toyota' market cap is 171 billion to Ferrari's 11 billion.
For the record, these companies are leaders for their target demographic. For example, GM makes less than $700 per car across their less than 8 million cars produced annually. (And yes, these are averages across their entire fleet - I am not trying to say that they only make $700 on every car.) Lamborghini, which might be the closest comparison to Ferrari (despite being a division of VW) only sells a little over 2000 cars a year and only averages about $5200 per car.
Anyhoo... that's my explanation as to why Ferrari doesn't sell as well as Toyota.
You answered faster than me, but you underestimated your very valid point. Ferrari is about 10x more expensive on average. Still, your insight was going in the right direction.