Other than hearing this, have you also read it somewhere on the interwebs? Perhaps you can post a link to such a claim, so we can know exactly what you are talking about?
alright, the first source is in agner fog objconv instruction
"11.27 How does the disassembler distinguish between code and data?
The first assumption is that code segments contain code and data segments contain data.
Unfortunately, some compilers put jump tables and other data into the code segment, even
though this gives inferior performance."
"The problem wouldn't be as difficult if data were limited to the .data section (segment) of an executable (explained in a later chapter) and if executable code were limited to the .code section of an executable, but this is often not the case. Data may be inserted directly into the code section (e.g. jump address tables, constant strings), and executable code may be stored in the data section (although new systems are working to prevent this for security reasons)."
but this is not further explained and i wonder what is a reason of