As stated above, the original plan for the Atari 8-bit computer line was for the 400 to have 4K of RAM and be a games console without a keyboard and the 800 to have a basic 8K of installed RAM, (expandable to 48K) and be a general purpose home computer. 4K sounds silly, particularly when the more advanced graphics capabilities of the machine required more than 9K video RAM (inclusive of player/missile graphics) but RAM was still very expensive in the late 70s and the 2600 games console managed with only 128 bytes!
During pre-release development, the price of RAM fell to the point that the 400 could be released at a competitive price with 8K and soon thereafter 16K RAM as standard.
Atari executives had meanwhile been blown away by the Star Raiders game, which was by far the most advanced games application developed pre-release, and realised correctly this would be a killer app for the 400. Unfortunately, Star Raiders required 8K of RAM and a keyboard to play. Hence the 400 had to be rapidly redesigned to have a cheap keyboard, and coincidentally could reasonably be launched as a budget general purpose computer for programming with a BASIC cartridge and 8K of RAM.
Opinions vary on the usability of the 400 keyboard. As membrane keyboards go, it's about as good as they get. I did an awful lot of typing on mine before eventually replacing it with a 3rd party 'proper' keyboard and for me it was acceptable for programming- certainly wouldn't have dreamed of swapping my 400 for a VIC-20!
Remember too, that you're not going to be typing in and editing hundreds of lines of code with only 1K (for a 4K machine) or 5K (for an 8K machine) of free RAM to play with under BASIC and a cassette player to store it on!