Here are some of the legal reasons why you may see this happening:

1. Arbitrage Efforts or Intraday trades: Some of these operations may be part of arbitrage strategies, where participants capitalize on price differences across various markets or exchanges. They might purchase shares at a lower price in one market and sell them at a higher price in another, aiming for profit.


2. Portfolio Adjustment: Entities like mutual funds or asset managers might execute these trades as part of their portfolio adjustment strategies. They realign their holdings to match their investment goals, possibly selling stocks to then buy them back for optimal asset distribution.


3. Adhering to Regulations: Transactions might be carried out to adhere to specific regulatory mandates or limits concerning share ownership in a company. An entity could sell shares to meet regulatory criteria and repurchase them once the regulations allow.


4. Enhancing Market Liquidity: Certain participants, such as market makers or high-frequency traders, undertake these trades to provide liquidity, helping to narrow the spread between buying and selling prices and improve market dynamics.


5. Managing Risks: To mitigate risks, traders and investors might buy shares to offset or hedge against their short positions or to safeguard against anticipated market movements.


6. Tax Strategy: Engaging in buying and selling activities could also be driven by tax strategies, such as selling shares to recognize losses for tax benefits, with plans to buy them back later.