The cooling unit of a refrigerator is made at the top because:
Cold air sinks
This is because hot air rises and cold air sinks. When the air near the cooling unit loses heat, it will sink to the bottom whereas the hotter air at the bottom will rise to the top. This is due to the density difference between them since hot air has a lower density than cold air, hot air will rise. When they rise, they will be cooled by the cooling unit too. And then sink to the bottom again. This cycle will then repeat itself until the air is a constant temperature.