Many components are electronically serialised - and, when fitted, are effectively registered to the device. Unless properly registered during installation, some components may not work correctly, if at all, if transferred between devices.
Screens, by example, are individually calibrated by way of a unique calibration file when installed. Special software is used by Apple to retrieve and install the calibration information during installation of the hardware.
Apple does now offer self-repair as an option in some regions/countries - although this (a) may not be cost effective and (b) carries risk if something were to go wrong (no warranty). If interested in this option, start here:
Self Service Repair - Apple Support
There are also third-party guides that describe the process of stripping-down and repairing some iPad models (iFixit is one example).
Having your iPad repaired by Apple is perhaps a better option - as the repaired device carries a limited warranty. For practical purposes, in lieu of repairing and returning your own iPad, Apple usually exchange a qualifying iPad for a renewed/refurbished iPad of the same model and specification. The cost of the exchange is the same as would otherwise be charged for repair. Unless you have benefit of an active AppleCare plan, an out-of-warranty repair while expensive will be somewhat less than the cost of a replacement iPad.
As for out-of-warranty repair costs, Apple offers a fixed-price price repair. You can verify eligibility and cost for your region/country here:
Apple Service and Repair for iPad - Apple Support
If you have an active AppleCare+ plan, the cost of repair is reduced to a small excess/deductible fee.