Enough of the quote to get the actual point across: "Money is the barometer of society's virtue[...]when you see that men get rich more easily by graft than by work[...]your society is doomed."
The point was, in the ideal society, money is the barometer of society's virtue. Presuming that all money is _earned_, more of it is an indication of the society's success. So, the motive is indeed to maximize profit, earned profit.
http://www.silverbearcafe.com/private/aynrand.html
The quote has nothing whatsoever to do with maximizing profits. It's about watching the flow of money to determine what kind of society you live in.