"Why does this keep happening"
Because people either a: lack proper knowledge; b: are making generalizations, regardless if they know the correct answer or not; or c: fail to keep up with the times.
"and how to avoid it?"
Educate them or find a new job.
Back in the day, you only had designers and programmers. A designer was anyone working pretty much exclusively in Ps or Ai - never touched code, html or css. A programmer was everything else; from backend code, to the html / css / js - if it required a text editor and an (s)ftp client, it was on the programmer.
Now - there are specific positions for specific aspects of a project. Designers still use Ps and Ai, but the programmers have been broken up. You might have someone that only does html / css. Another person that only does UI / UX engineering. Another person that only does backend code. Another that only does DB design. Another that only takes care of the servers.
"Every time I say I'm a Front End Developer, my colleges think: "Oh Look! He designs interfaces with PhotoShop, and then with HTML/CSS magics he turns it into a website""
Not to put you down or anyone else that holds the job title of "Front End Developer" but amongst full stack developers; a certain stigma comes with that. Front End implies html / css and js if your lucky. Where the real meat of the work; the real pain of any project; is generally in the backend - dealing with database connections, writing scalable code, writing sql injection proof code, etc...
The line has been greyed of course with languages like NodeJS. Now you find front end developers making db calls; making api calls; scrubbing inputs - but again, front end has generally been just the front end and a lot of people won't acknowledge that title more then that. The people thinking this of the title are probably seasoned full stack developers (such as myself) or close to being one and to a full stack developer I'd have no need for a front end developer. In a project of any scale, writing some html / css / js is generally the least of my concerns and is a requirement of me (the developer), not a need to hire another person to do what most full stack developers learned a decade ago, haha.