If i understand it correctly, oxygen concentration when diving air is 21%. Based on ppO2 of 1.4 bar, that means that i would be at a max depth of 6.7ata or equivalent to about 67m?
Yes, you got it, for a max pO2=1.4.
If i am diving recreationally, and at a max depth of 40m, does it not mean that i should set the ppO2 to 1.05bar i.e. 5 ata times by 21%?
No.
As other have mentioned, oxygen is toxic at higher partial pressures. There have been numerous studies regarding oxygen toxicity. The results of those studies demonstrate that there is significant individual variation regarding tolerance to higher oxygen pressures before a seizure occurs. Some generalities can be made based on these studies.
Very few people have a seizure when pO2<1.4, so that is the generally accepted maximum allowable pO2 that you will see quoted. Keep in mind that keeping your pO2<1.4 doesn't absolutely guarantee that you won't have a seizure. There are no absolutes in diving. If you are diving is very cold water or exerting yourself or have a hangover, etc., then it would be wise to be more conservative by keeping pO2<1.2 for instance.
Tech divers will often accept pO2 up to 1.6 so that they can use rich mixtures (e.g., 100% oxygen) to shorten decompression time. When breathing gasses where pO2=1.6 they must limit their activity and ensure they stay warm to lower their risk of seizure at that high pO2.
When the pO2>1.6 the risk of seizure is very high, although it is clear that many tech divers will expose themselves to these higher partial pressures. I think the record for an air dive is over 400 feet, which means pO2>13 if my math is correct. So clearly people can tolerate very high pO2 and survive but not without great risk.
So back to your question.
You computer will calculate a maximum operating depth (MOD) for your gas based upon your two inputs: (1) the type of gas that you are breathing (e.g., air, Nitrox 32%, etc.) and (2) your desired maximum pO2.
Your computer will then alarm when you reach that MOD (or pO2), depending on the specifics of your computer and whether or not you have the alarm turned on.
A Nitrox course will make all of this clear to you.
Read your computer's instructions carefully.
If you don't fully understand the effects of pO2 then I suggest you shouldn't be diving deep. Dive within the limits of your training. What you don't know can kill you.