The Twitter algorithm was not public until 2023 when Elon Musk open-sourced its code on GitHub. This has provided valuable insights into how the algorithm works and how users can optimize their content for better visibility and engagement.