Whatever reason you may have for needing to bring a pair of shoes with you on your hand luggage, rest assured - you are allowed to carry shoes in your hand luggage or carry on baggage.
The real question is:
The security agency handling the security screening may deny some shoes to be carried in hand or carry on luggage. That will depend on their luggage restrictions and judgment.
Regular shoes less than 10cm long and weighing no more than 5kg are generally allowed.
Anything over the limit should be placed in checked baggage or checked in as part of your sports luggage.
As you probably know, sharp objects and anything that can potentially be weaponized are not allowed in the cabin.
Shoe heels can sometimes be pointy enough to be considered dangerous. Track shoes with metal spikes also fall in the sharp object category. Though they are seemingly harmless items, they can cause injury when in the wrong hands.
You may carry shoes with heels in hand luggage if they're not too big. The heels should also be less than 3cm high.
Stilettos are not usually considered a serious security risk. Still, they may be denied depending on the assessed risk by security staff.
Ice skates are not permitted in your carry-on bag. You should pack them into your checked baggage or check-in as part of your sports luggage.
Fill your shoes with socks. Doing this will help keep the shape of your shoes and prevent them from being squished in your luggage.
Put them inside a dedicated shoe bag to protect them from being scratched by other items in your luggage.
In case the soles of your shoes are dirty, this will also prevent mess. If you don't have a shoe bag, you can use any bag really - you may even use Ziploc bags or shower caps. If you opted for a shower cap, just place the sole by the closed part.
You can also wrap the bag in a towel or shirt you're also carrying in your hand luggage to go the extra mile.
Clean your shoes before packing them to be sure.
Heels and formal dress shoes should be kept away from other items because they may get damaged if they contact other objects. Make sure your delicate shoes and those with delicate details are protected by separating them from anything they can get caught with or scratched.
If you think you'll be needing the shoes, you can put them on the top of your luggage, so it's easier to access.
In addition, the shoes mustn't protrude from the hand baggage.
Hand luggage regulations are very important. Make sure you know them before traveling.
You need to balance the requirements of airlines, airport security, and your needs.
Respective airline has their own security rules. But, they don't actually conduct security checks directly.
Hand luggage restrictions and luggage regulations, in general, are, in fact, decided by the government. The airport security does security checks. They use a national or international standard to decide what may and may not go through.
TSA or the Transportation Security Administration is an agency that works at the airport. It is responsible for checking passengers' bags in the USA.
The German police are also responsible for the security checkpoint in their airports.
These are all to diminish the risk of terrorism.
Airlines have different regulations about this. For many major domestic airlines, there aren't any weight restrictions for carry-ons. You'll just have to be able to lift it over your head and fit them into the overhead bins.
Other airlines' carry-on weight limit varies from 5 kilos to 15 kilos. Their regulations depend on many factors like the destination, route, and the class you're seated in.
If you go over the weight limit, you will pay an excess baggage rate, which also varies depending on the airline and different factors.
You can bring most types of shoes in your hand luggage if they pass the size limit. The exceptions are those that the security staff deems as potentially dangerous, like track shoes with metal spikes.
In case you're packing a pair of shoes in your hand luggage, make sure they're clean and wrapped separately to protect the shoes and the other contents of your luggage from damage and dirt.
Regulations about bringing hand luggage vary per destination and airline, so it's best to check with them when in doubt.