Knowing how to control aspect ratios in your composition can be very important depending on what you are shooting. I learned that early in the game both in wedding/portrait photograhy and commercial work. When I was a trainee in a studio, the boss said "you can put a square peg in a round hole kinda thing and you can't print an image that is composed for a 5x7 print (5:7) and make a perfect 8x10 (4:5) print. Too simple- in those days most weddig albums were made fo 8x10 prints, we shot on 4x5 negatives and made 4x5 proofs and parent's albums and the formal portrait was 16x20. Most standard pre-manufactured picture frames were in the aforementioned 4:5 ratio. Weh we made the transition in roll film, the 2 1/2 square cameras were popular so Rolleiflex users had to learn to leave space to accommodate the almighty 8x10. They came to a plethora of so-called ideal format cameras- 2 1/4 x 2 3/4 (6x7 cm) so we were back in the saddle to fill the negative and make the prints. Then came a glitch for 'ideal format" habituates- the 10x10 wedding album- you didn't need mattes or have to reorient the album for horizontal or vertical prints. So, you could operate 2 systems, square and 6x7 or 6x 4.5, trade-in you Linhof Pres 70 or Mamiya Press, or Koni-Omega Raped for a Rolleiflex, or simply learn how to leave enoug space to accommodate odd formats.
Of course nowadays, for folks like me who still make and sell albums there are all kinds of more sophistical multi-format albums that can accommodate standard sizes, odd sizes, panoramics, ovals, circles, multiple images on a page, and more. You still have to know how to plan for any of these various formats. As for picture framing- I do all custom frames and matter so any ratio can be accommodated.
Is the "ideal format" really all that ideal? That is a discussion for anoter long post or perhaps a thesis. Some research shows that ratios and proportions used by an Old Master and classical artists (painters) are the roots of what we now consider aesthetically correct. Someof this is traced back to early mathematicians who came up with theories of divine proportions. The rule of thirds is the tip of the iceberg
In commercial work, the aspect ratio is addressed by photographers on a daily basis. Simply stated, the image has to fit into specific layouts, boxes, frames, page sizes, product label size, and proportions, various screens, TV formats, billboard formats, you name it!
None of this means that you must conform to any aspect ratio unless you need to. Having certain variations in your camera can be helpful in certin cases. With today's camer with very high pixel counts, losing a few pixels should not seriously degrade your images. It was more problematic with film, especially in the 35mm format where if you allowed enoug space to accommodate cert ratios grain and acutance could be seriously affected.
Here is a link to a very comprehensive tutorial on aspect ratio. Also, see the attached chart.
https://phlearn.com/magazine/how-to-know-which-aspect-ratio-to-use-in-your-photography/