Why are programs executed in main memory?
They are not.  On modern desktop/server OSes, the program generally mmapped (or equivalent) into virtual memory and the currently running parts are paged in as needed.  However, the remainder of the program can sit on secondary storage and never be accessed.

The reason for the currently executing parts of memory being paged in as opposed to running directly from secondary storage is performance.  In general, any read access to secondary storage tends to be cached in memory, either directly through virtual memory or indirectly through something like a disk cache.  In fact, in the main memory there's an extensive cache hierarchy (typically 3 layers on x86 Intel / AMD processors) so even the idea that the program is store in "main" memory is mostly a convenient simplification, not a complete description of reality.  What actually happens is that some parts of the program are paged into main memory (by the OS) and some parts of the the program from main memory is cached into the L3 cache (by the CPU) and some parts of that are cached into the L2 cache(by the CPU) and some parts of that are cached into the L1 instruction cache (by the CPU).

On embedded systems and more exotic architectures, deviations from this pattern definitely exist.  Execute-in-place was already mentioned but another example is Harvard architecture processors, where instruction and data memory are completely separate and code runs from the instruction memory which isn't addressable as data.  Small embedded microcontrollers like PIC and AVR are examples of such processors.