both sements have different attributes ..Usually one is code is READ ONLY .So you want to protect the code from getting corrupted or modified ! .Otherwise this give raise to spaguetti CODE..you will never know where is the begining or end .
So if thomething goes bad you can loose your data ,though if properly backed up there is no reason.But the code is the intelligent part of the machine You want to protected from getting corrupted or lost ,or modified by somebody else to gain control of your system ...DATA is read and write, so they have to be in separate memories spaces,even if they are in the same memory chip, or they can also be in separate memory midiums .. SRAM,EPROM etc and have violation check circuitry.