I've worked with the ECG standards a lot, and have occasionally come across this issue. It's best to consider defib and pacemaker separately.
For defibrillator protection:
IEC 60601-2-27 is for patient monitoring, typically 3 or 5 lead, and for this purpose it's fairly obvious that the equipment needs defibrillator protection. The equipment is intended for use for long periods of time, and monitoring patients that already ill and have a plausible likelihood to go into fibrillation. No arguments there.
IEC 60601-2-25 is for 12 lead diagnostic ECGs. For this, it's never been clear why it is needed. It is mandatory, and the standard does have a rationale for the requirement. In the first paragraph of the rationale they say that the probability of a patient needing defibrillation is low: a diagnostic ECG is only short time use, often for investigation and screening, i.e. many of the patients have a healthy ECG. But the standard then launches into a long discussion about the technical effects, without actually dealing with the question of whether it is needed in the first place. I guess the implication is that while the probability is "low", the impact is large, hence it is worthwhile.
In my experience, 12 lead ECGs have a several logistical problems. The first is that the placement of the chest leads could potentially get in the way. Also, a lot of 12 lead ECGs use suction cup electrodes for quick screening, these come off fairly easily. If for whatever reason just one electrode is removed from the patient, that floating electrode is dangerous as it will carry the voltage of the defib pulse, and the ECG is likely to alarm "ECG off" which makes it useless for monitoring. Also 12 lead ECGs have a 0.05Hz high pass filter (for ST segment analysis), which requires about 20s to recover, again making it fairly useless for checking if the defib was successful. Finally, diagnostic ECGs can have a complex user interface, it's not designed to give quick information you need for patient monitoring. I've tested a lot of 12 lead ECGs and find the software/menus mindbogglingly frustrating, and it's ridiculous to suggest it might be useful in an emergency situation. A user could deep in a low level menu page for the analysis side, or set up, or looking at a stored waveform; there's often no simple "home" page like a normal patient monitor. Most defibs have their own ECG monitoring, so it's more likely the defib user will look to that for checking the patient is OK rather than trying to fumble through the menu system for a 12 lead diagnostic ECG.
All in all, it seems a bit of an inside joke to insist on defib protection for 12 lead ECGs.
There may be special cases such as stress testing (where the patient's ECG is recorded while on a treadmill) that could justify having defib protection. The duration is longer, the patient has a suspected illness and you are deliberately trying to invoke the issue by adding stress. A heart attack is on the cards. But that should be optional, and if defib protection is claimed the issues above also need to be addressed, for example: maybe in stress tests the ECG electrodes are more reliably attached, the 0.05Hz high pass filter is disabled during recording; the user interface is simplified so the ECG trace and heart rate are always visible regardless of menu, controls etc.
Now, having said all that there is still the question of FDA clearance: the FDA "rules" do allow deviations from a standard, as long as it is justified. From a business point of view it could still be easier just to comply with the standard rather than risk an FDA reviewer that does not agree with the argument.
Pacemakers
Pacemakers are a different case: for IEC 60601-2-27, an ECG should be able to pick up the real heart rate even if a pacemaker is working. This is called "pacemaker rejection". An example would be if the patient's heart has stopped or is in fibrillation, but the ECG says everything is normal because it is working off the pacemaker. Which is dangerous of course.
In contrast, for IEC 60601-2-25 it is more about distortion of the ECG trace. The requirement of the standard is that the distortion should be within certain limits. Pacemaker rejection is not required.
In either case, the best way is to detect and mask the pacemaker pulse. If you are using a high speed ADC (e.g. 10kHz) it's possible to do this in software, otherwise it normally requires a dedicated hardware circuit to pick up the fast transient and signal to the software to mask say 5~10ms of ADC data.
It is possible to pass IEC 60601-2-25 without masking but the results are a bit messy and usually requires particular filter settings which then need to be disclosed in the operation manual. In my opinion, the equipment should pass the test in the default filter settings, but this is not actually stated in the standard.
For defibrillator protection:
IEC 60601-2-27 is for patient monitoring, typically 3 or 5 lead, and for this purpose it's fairly obvious that the equipment needs defibrillator protection. The equipment is intended for use for long periods of time, and monitoring patients that already ill and have a plausible likelihood to go into fibrillation. No arguments there.
IEC 60601-2-25 is for 12 lead diagnostic ECGs. For this, it's never been clear why it is needed. It is mandatory, and the standard does have a rationale for the requirement. In the first paragraph of the rationale they say that the probability of a patient needing defibrillation is low: a diagnostic ECG is only short time use, often for investigation and screening, i.e. many of the patients have a healthy ECG. But the standard then launches into a long discussion about the technical effects, without actually dealing with the question of whether it is needed in the first place. I guess the implication is that while the probability is "low", the impact is large, hence it is worthwhile.
In my experience, 12 lead ECGs have a several logistical problems. The first is that the placement of the chest leads could potentially get in the way. Also, a lot of 12 lead ECGs use suction cup electrodes for quick screening, these come off fairly easily. If for whatever reason just one electrode is removed from the patient, that floating electrode is dangerous as it will carry the voltage of the defib pulse, and the ECG is likely to alarm "ECG off" which makes it useless for monitoring. Also 12 lead ECGs have a 0.05Hz high pass filter (for ST segment analysis), which requires about 20s to recover, again making it fairly useless for checking if the defib was successful. Finally, diagnostic ECGs can have a complex user interface, it's not designed to give quick information you need for patient monitoring. I've tested a lot of 12 lead ECGs and find the software/menus mindbogglingly frustrating, and it's ridiculous to suggest it might be useful in an emergency situation. A user could deep in a low level menu page for the analysis side, or set up, or looking at a stored waveform; there's often no simple "home" page like a normal patient monitor. Most defibs have their own ECG monitoring, so it's more likely the defib user will look to that for checking the patient is OK rather than trying to fumble through the menu system for a 12 lead diagnostic ECG.
All in all, it seems a bit of an inside joke to insist on defib protection for 12 lead ECGs.
There may be special cases such as stress testing (where the patient's ECG is recorded while on a treadmill) that could justify having defib protection. The duration is longer, the patient has a suspected illness and you are deliberately trying to invoke the issue by adding stress. A heart attack is on the cards. But that should be optional, and if defib protection is claimed the issues above also need to be addressed, for example: maybe in stress tests the ECG electrodes are more reliably attached, the 0.05Hz high pass filter is disabled during recording; the user interface is simplified so the ECG trace and heart rate are always visible regardless of menu, controls etc.
Now, having said all that there is still the question of FDA clearance: the FDA "rules" do allow deviations from a standard, as long as it is justified. From a business point of view it could still be easier just to comply with the standard rather than risk an FDA reviewer that does not agree with the argument.
Pacemakers
Pacemakers are a different case: for IEC 60601-2-27, an ECG should be able to pick up the real heart rate even if a pacemaker is working. This is called "pacemaker rejection". An example would be if the patient's heart has stopped or is in fibrillation, but the ECG says everything is normal because it is working off the pacemaker. Which is dangerous of course.
In contrast, for IEC 60601-2-25 it is more about distortion of the ECG trace. The requirement of the standard is that the distortion should be within certain limits. Pacemaker rejection is not required.
In either case, the best way is to detect and mask the pacemaker pulse. If you are using a high speed ADC (e.g. 10kHz) it's possible to do this in software, otherwise it normally requires a dedicated hardware circuit to pick up the fast transient and signal to the software to mask say 5~10ms of ADC data.
It is possible to pass IEC 60601-2-25 without masking but the results are a bit messy and usually requires particular filter settings which then need to be disclosed in the operation manual. In my opinion, the equipment should pass the test in the default filter settings, but this is not actually stated in the standard.