Gayan touched on an important point regarding the transformer capacity. Devices that handle current (transformers, resistors, transistors, etc) produce heat as a result of the flow of current. These devices may be expected to handle the rated current flow continuously or only for short periods of time. These devices can be built to handle the rated current for short periods - or continuously. It is likely that the device made to handle the rated current for short periods will be smaller and less costly. If you understand your needs you can better define the requirements of the devices. Quite often the needs aren't so clear - or the specifics about the devices to be used aren't available. One approach can be to oversize the device. Derating is another word that applies here - we might "derate" a 3 amp transformer made for intermittent service so that it can be used for continuous service.
Temperature is another significant factor. A transformer might carry a rating that is based on a 25 deg C ambient temperature. That's more or less room temperature. An equipment enclosure would likely be warmer. Good design practice would require one to de-rate the transformer based on the expected operating temperature.
As a hobbyist you might not get too wrapped up in all this but someone designing products or systems where reliability is an issue would need to understand and manage these factors. Many people just apply some factor of safety ( a 3 amp transformer for a 1.5 amp load is an example) or put the project together and look for problems.