5mm LEDs are generally only rated for 20mA continuous, but can handle 100mA when pulsed. So by pulsing at 38kHz, you can run at 5 times the power which gives you more range and better signal/noise margin.
Were you using a simple phototransistor or photodiode, 38kHz should not be necessary for a simple experiment. However the datasheet for your receiver IC says "The TSOP314.. is optimized to suppress almost all spurious pulses from energy saving fluorescent lamps but will also suppress some data signals." which suggests it's going to reject anything without a modulated pulse. The datasheet lists several parts with filters for 30kHz through 56kHz. You'll need to match your transmitter modulation kHz to your receiver.