Broadly speaking wide aperture lenses are easier to design the longer the focal length. The reason that you don't see any 400mm f/1.4 lenses is due to manufacturing difficulties, e.g. keeping dispersion low while producing elements of the size required for such apertures. It's worth restating that the designation f/1.4 means that the size of the aperture stop is the focal length divided by 1.4, which for a 400 f/1.4 is a whopping 285mm. Technically it's the image of the aperture stop that must be that size, which means the front element has to be at least that big.
If you look at the widest of Canon's superteles you see a pattern that 150mm seems to be about the limit of what is economical:
400/2.8 = 142mm
600/4.0 = 150mm
800/5.6 = 142mm
Lenses with focal length less that the registration distance (about 46mm for most DSLRs) have to incorporate what's known as a retrofocal design, which is essentially a reverse telephoto group (or "wide converter") at the back of the lens. The wider the lens the more corrections have to be performed due to the retrofocal design, and these corrections are more difficult for wide apertures lenses.
You can see this if you look at the design of the Canon 24mm f/2.8 and 50mm f/1.8:
Canon 24mm f/2.8
The reason 50mm offer such good price/performance ratio when it comes to aperture is that for 35mm cameras that 50mm sits at the sweet spot where the focal length is long enough to allow a simpler non retrofocal design, but not too long that large pieces of glass have to be used to give a good f/number.