The photograph shows an extruded magnetic profile which has been embedded in an extruded TPE profile.
Some magnets are embedded because of colour requirements. (Magnets can only be produced in very dark colours.) Others are embedded because of installation requirements. (Magnetic profiles are very rigid.) And still others are embedded for hygienic reasons. The profile is used as a closing device on drink cabinet doors.