meaning of sign in doctor's office

For brevity's sake, there are certain assumptions made in the sign's wording. It is not a joke.

First, the sign is addressing those patients who may not show up for their appointments in the future. It is giving them a warning:

If you miss an appointment without 24° prior notice, you will be charged $25, so please have the courtesy to cancel an appointment properly if you find you will not be keeping it. This volume of missed appointments costs us money, so we're passing that on to you when you're responsible.

It does not mean:

Every patient with an appointment will be charged $25 if they don't cancel it within 24° of scheduling the appointment.

That would be very, very bad for business. Though it might generate some additional income immediately after posting, the practice would lose a lot of patients due to their indignation (and rightly so).

Language has context, and signs - because of brevity - are a great way to figure that what that context is.