I always thought that Opportunity had a Master-Detail relationship with Account. Which means that you aren't able to create an Opportunity without an Account.
Today I ran apex code to create an Opportunity. It did not have AccountId set. So I expected it to not execute the code. Lo and behold, the Opportunity was created. If I then want to edit the opportunity, I can't save it because of the standard Salesforce settings which require an Account for an Opportunity.
I executed the following code:
//Create an Opportunity Opportunity testOpportunity = new Opportunity(Name = 'Test Opp', CloseDate = Date.today(), StageName = 'Qualification'); insert testOpportunity;