IMHO Commodore demise has nothing to do with technical problems or money, it was poor management all the way down.
They made a lot of money from the Amiga in the early days, easily paying off it's development, marketing and expenses right up to and including the A3000.
Where it went wrong is hard to say but they could have, and should have, done more with the A1200/A4000/CD32. I love those machines and I have one of each
but it's obvious that they're not what they should have been when they were released.