It was a good piece of business as the defense of it would have cost resources but it still would have been a walkover against a serious opponent. And they would have lost it soon enough, at the latest in 1848 and the upheaval then.
The question of whether the US has made a return is not exactly the same as whether Russia profited off of the transaction (the costs to the US of governing the property may not be representative of what Russia would have paid), but they are related.
Actually, the usual belief held by economists is the opposite: that it's almost never true that holding real estate is better in the long view than selling it and investing it, since the value of land as a fraction of industrialized economies has been constantly falling and conversely, labor/capital rising. (There's also the diversification and uncompensated risk issue.)