I use neodymium magnets in my work as a research scientist and I regularly carry them aboard aircraft in packaging.
We are not talking fridge magnets here, these are serious high-field permanent magnets. If two of them get properly stuck together they cannot be separated again easily. (The fields are far too strong to be pulled apart by hand and you can't use any metal tools for obvious reasons. One trick is to use a heavy, non-ferrous plastic-coated mallet to smash one off the other at the edge of a table, but even then it's usually half the day wasted.)
The problem is that the strength of the force between two such magnets is not intuitively understood by people unfamiliar with them: for example, your typical customs or security inspector. There might be almost no noticeable force between two magnets when they are some distance apart in the packing box but once they get within 5 to 10 centimetres they will suddenly be attracted together and anything in the way (flaps of skin, fingers) will simply be crushed flat under the force.
Or if nothing slows the magnets down as they come together, the force of the impact can chip the surface of the metallic protective layer, spraying shrapnel and metal fragments everywhere which poses a risk in particular to eyes. (The alloys used in constructing these magnets are extremely brittle.)
If the magnets get stuck to other large metal objects it can be a pain to separate them. They also induce weak magnetism in metals you normally expect to be non-magnetic.
Finally if they get wiped across anything like a credit card or ID badge that's usually the end of it (not always actually, it's a bit random).
The magnets are not extremely dangerous, getting small bones broken or metal fragments in the eye is the worse case scenario on my risk assessment, but they are not toys and there is a risk to those untrained in handling them. So anything like this needs to be identified so that they can be treated with care if someone does want to open my luggage to fish around inside it.